Character teleport when play animation.

Hi everybody !

I’m on this problem since a few day.
I have created a character and done some animations, and one of them have bones and an IK solver.
I work with 3DS Max and FBX exporter 2012.

So when i export it, with or without bake animation, when the character is put in the scene and play an animation, he teleport himself to an other location. When he is playing this animation we can’t move him like we set his position in an update.
I don’t understand why, there is no script just an animator…

Someone have an idea ?

Thanks in advance.

Some models have animations that lock them at a specific location. Try parenting it to another game object such as a capsule with the mesh renderer turned off and moving the capsule.

It work only if i attach a rigidbody and i lock all the movements.
I think i will continue like that.

Thanks

Try moving the model to where it “teleports” to and then parent it there. Forgot about that.

I lock entirely my character move and i parent it to another object who will receive scripts.

Thanks worked well!

If you are using a CharacterController an easier solution is shown below. Just note move takes the displacement.

    void OnAnimatorMove(){
   
 
        if (Input.GetKeyDown(KeyCode.G) && throwObject.projectile != null)
        {
           controller.Move (throwObject.projectile.transform.position-transform.position);
        }
    }