How to make a step forward for each atatck attack?
Good day to all the experts and masters of Unity. I am new to Unity, can someone help me how to set a script to let the player step forward for every attack? Heres my simple flow:
(iddle---attack---iddle)
where is attack animation should move a little forward to emphasize the animation. However, what I did before is to add transform property in the animation timeline and animate the values of position for each frame. I realized that at the end of animation clip the position is not anymore set to default (0,0,0) and the ATTACK animation is not anymore allign when it goes back to IDDLE animation.
I am not sure if I did the wrong method or just missing some script. Please let me know or any advise that can help would be more appreciated.
Answer by tormentoarmagedoom · May 20, 2019 at 09:26 AM
Hello.
If the problem is that the position of the object after animation is "reset" is because the animation is not set as "Root Motion".
I recomment you to watch some tutorial about this functionality. ITs exactly what you want. no need code, just the animator.
Bye!
Your answer
Follow this Question
Related Questions
Can't delete animation event 0 Answers
How to copy and paste animation events from one clip to another if those clips are included in FBXs? 1 Answer
Animation Event Audio Clip not working! 1 Answer
Animation Events - Footsteps Issue,Unity Footprints Animation Event - No Receiver, missing Component 0 Answers
Using Unity animation event on multi-player trigger multi count ? 0 Answers