Day 37: Weapon animations
- neelvinay17
- Aug 14, 2023
- 1 min read
My plan for the day:
I wanted to add in attack animations, but rather than using custom animations like last time, I decided on mixamo animations.
What I accomplished:
I started off by creating another script called Player Attack, which would handle the attack animations for now. Some simple code allowed it to play the target animation iof the light and heavy attack. I then went into the input handler and added in a few more public bools that would be used in the reset is interacting script, now renamed to reset animator bool. I added in a public string targetBool and status. I then created an override void for the animator.setBool. In the player controls import settings, I added 2 more player actions, one for the light attack, and one for the heavy attack. I binded the light attack to "E", and the heavy attack to "R". Once that was done, all that was done, all I needed were the animations, which I had downloaded from mixamo before. I imported them, and checked bake into pose for rotation and position for Y. I also created avatars and changed the animation type to humanoid. The animations worked now, and next up would be creating player damage and health.
______________________________________________________________________________________________________
Video Link : https://clipchamp.com/watch/99MnKIlyHYJ

Image Source: The Unity game




Comments