When animation end play reverse
hi, so i need help. I started working on mobile project where you get to dodge spikes and there the only move i when game start go down i i tap go up.And now i want to make my game look better so when i tap it will play animation that will rotate object for 90º, now the problem is when i stop the animation still plays and then restart i want to make it when im holding button and it comes to final form stay like that and when i release to play reveres animation from that point. Hope you understand what i want to do, i tried something like this : foreach (Touch touch in Input.touches) { transform.position += Vector3.up * Time.deltaTime * Speed * 2; if (touch.phase == TouchPhase.Began) { anim.speed = 1; anim.Play("Idle"); } if (touch.phase == TouchPhase.Ended) { anim.speed = -1; } }
didnt work , and after that i read this : https://answers.unity.com/questions/784567/how-to-make-animation-position-start-from-last-pos.html
That's giving allots of errors in my project so i decided not to.
My last hope is if you can help me,
and sorry for bad English.
Your answer
Follow this Question
Related Questions
How can I improve this code? 1 Answer
Animation does weird 0 Answers
Script seems inactive? 2 Answers
WTF does this error mean 1 Answer
why StartCoroutine(SpawnBigTree()); don't work and the float has a error 0 Answers