- Home /
Change animation at runtime with Mecanim
Dear Community,
I have a little 2D-Ball GameObject. I want it to be instantiated, and its transform.position to be animated, whenever I click the mouse button. The balls starting position is the position where I clicked. Then I want it to pass another Vector2 and end at a third. All Vector2 positions are different every time I play the animation. How do I access the balls animation every time that I want, but set the keyframes to different values?
Or should I not use animation at all? Should I use the update function with Vector3.movetowards or Vector3.Lerp???
Thank you for your support!
Your answer
Follow this Question
Related Questions
GameObject moving left to right AND up 1 Answer
Not able to fire projectiles at mouse position 2 Answers
How to count instantiated objects that passes a given point (transform.position.y) 1 Answer
transform of instantiated bullet via ui button press not following the player 0 Answers
Why can't I get the transform from an instantiated object? 1 Answer