- Home /
Mechanim Eliminates Gravity
Hi, all!
I have a simple cube with a 'Roll' animation, which causes it to roll to the right once, onto the face immediately to the right. I have an Animator and an Animation Controller. My goal here is to have a user press a key, and on the key press, the cube rolls once to the right. Several problems with this, however:
When using Legacy, the animation plays, but it snaps back to its starting position when finished looping
When using an Animation Controller, I select 'Apply Root Motion' (This is, as I understand it, what will cause the cube to move without snapping back to its previous position/rotation), and this turns off the gravity on the rigid body due to the need of a default looping Idle state.
How can I let my cube roll once on a key press and not immediately roll back? I am looking for a kind of Relative Positioning with the animation. So movement in local space instead of world space? I don't know...
Thanks for the help! - YA
I know that physics is a viable solution for this,but I would much rather use animation. Is it not possible to use animation for translation?
Your answer
![](https://koobas.hobune.stream/wayback/20220613141510im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Rolling a cube 2 Answers
Smooth 3D Dodge Roll Animation 0 Answers
Animation play 1 Answer
Raycast play animation1 and then animation2 1 Answer
Animation (Legacy) not working when attached to gameobject 0 Answers