- Home /
How to prevent animator change Y position
I got a problem when using animator in Unity. I want to cast a ray from the position of the character to forward by using
Ray ray = new Ray(transform.position, transform.forward);
Physics.Raycast(ray, out hitInfo);
But when I check the "Bake Into Pose" in Root Transform Position(Y) the animator(Running and Walking) would change the Y position(even in idle state) and the Y axis would be lower than actual value and become negative. So the ray sometimes could not hit anything. But if I uncheck the "Bake Into Pose" the character would lose gravity. So how should I fix it?
Your answer
Follow this Question
Related Questions
how to fix roll animation resets to animation start position 0 Answers
Animators deltaPosition is (0,0,0) when using override layers above root motion animation 2 Answers
Animator in Unity 5 0 Answers
How to check if animator is in crossfade 1 Answer
Trouble syncing player model animation over network 2 Answers