Moving player with animation
I have a simple cube that I want to move with rotating animation. I have added an animation that rotates the cube to 90 degrees and moves forward. I have triggered the animation with Arrow keys. Now the problem is changing the position of the player and stoping the animation to start again on pressing arrow key. I have created a parent object and I move used transform.position to move but the problem is that it moves even before the animation. Please help. The below gif will give you some idea of what I am trying to acheive
Answer by shakti_patra · Jun 02, 2021 at 08:30 AM
Resolved, For people who are seeking solution to this issue. I created a parent object and added my cube under it. Now I have added two different animations, rotate animation on cube which is the child object and move forward animation on the parent game object. I stopped the loop from both these options and applied root motion and it worked like a charm...
Your answer
Follow this Question
Related Questions
Animator: multiple characters and one script 0 Answers
Position, Animator & RigidBody 0 Answers
Aim down sights not working with animations 0 Answers
how to play clip animation via animator Onclick? 0 Answers
AnimationClip length always equal 1 when prefeb is loaded from assetbundle with Unity5.3.2p1 1 Answer