- Home /
move the character according to the animation
i am using 3dsmax to export the animations of my character, i expect it will change the position of the character in unity, but it doesn't. for example, my animation will move my character forward for an second.
e.g. form 0,0,0 to 1,0,0
but once the animation end, the character move back to the position 0,0,0.
are there any ways to change the position of the character according to the animation without using something like CharacterController.Move?
Thank You
Answer by NickP_2 · Feb 04, 2014 at 02:02 PM
When you create an animation in any 3D program, the walk cycle should look like it is walking, but actually is holding its ground in worldspace. Later when you import it in unity, you can adjust the speed with the controllers or speed of the animation to match a perfect illustration of the person walking around.
What you did was probably move him in the 3D software, and now he "walks forward" when actually the object is holding it's place in worldspace, but the avatar is walking forward. This may sound very confusing, but its very crucial for further development.
yes, it move in the 3d software, and also in unity(just the avatar), so is that mean i have the separate the animation and the movement?
say, the animation should not move(every animation is at 0,0,0 in the 3d software), and after import to the unity, use the script to move my character?
Yes, it's the best way. because let's say you have some AI's running around, and they want to attack you, the only way they can reach you is to go to your objects position( which isn't the same as the avatar, if you do it like you did)
Ps: basic movement scripts are found all of the interwebs or unity script reference :)
Your answer
Follow this Question
Related Questions
Syncing object's coordinate position with object's animation position. 3 Answers
Unity 3 Animation Positioning Problem 1 Answer
set child object position when playing the animation 0 Answers
What is causing my attack animation to be in a different position from my idle/run animation? 0 Answers
Animation position problem 5 Answers