- Home /
Animation sets z.position to 0
l am making an endless runner game in unity. l have a c# code which plays jumping animation whenever space button is pressed.
if (Input.GetKeyDown("space")) animation.Play("autojump", PlayMode.StopAll);
but when jumping animation plays, it resets player's Z Position, even if l deleted keyframes of Z and X (note that Z is the position which player supposed to run to)
I use this script to make player run
void Start () { GetComponent ().velocity = new Vector3 (0, 0, 10); }
Comment
Your answer
Follow this Question
Related Questions
**Help please?**How do I activate my jump animation? (It's just 1 frame) 1 Answer
Multiple Cars not working 1 Answer
Even / Constant Speed and Jumping 2D 1 Answer
Distribute terrain in zones 3 Answers