i watched this tutorial:
and tried to implement the next scenario:
i have an airplane that need to roll when something happen.
i created a roll animation, add an animation clip and animation controller.
in animation controller i setup a variable “roll” and empty animation with transition to roll animation when the variable roll= true.
in my code i used:
the animation play but the player doesn’t keep his position and jump back to origin.
i tried to nest my player with empty gameobject but it didn’t help.
i tried t use animation.play(“roll”) but the animtion doesn’t play.