newb question here:
So I have a box playing an animation when I press the space bar..My problem right now is that every time the animation ends in a different position..Here's what I did:
so I have a box placed inside an empty gameObject. I set up a script for the gameObject to move left and right with the A and D keys. Then I animated the box inside the gameObject to "jump" every time I press the spacebar:
function Update () {
if (Input.GetButtonDown("Jump")){
animation.Play("jump");
}
}
the end position of my animation is different every time.. sometimes lower, sometimes way higher.. Anyone can point out what i'm doing wrong :)