Trigger animation cause the player to move another postion.

Hi all,

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:

anim.SetBool("roll",true);

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.

any suggestions?

OK, solved that… i had to import animation as LEGACY from the RIG options in the model.