Character Controller moves on top of Rigidbody after Animation
For some reason my GameObject jumps up on top of Rigidbody enemies after running an attack animation. I have also seen the teleportation like behavior happen during the animation as well.
The CharacterController moves the GameObject in the Update method.
Vector3 velocity = direction * speed * Time.deltaTime;
controller.Move( velocity );
controller.Move(transform.up * gravity * Time.deltaTime);
The attack is fired via
anim.SetTrigger("Attack");
The GameObject jumps on top of the enemy objects as soon as the button for the attack is pressed.
Enemy objects move using a NavMeshAgent and have Ragdoll Rigidbody, Box, Sphere and Capsule colliders attached to armature bones.
Any ideas on why this might be happening?
Your answer
![](https://koobas.hobune.stream/wayback/20220613023843im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Rigidbodies stopping Root Motion of animations 0 Answers
Issue with AI falling through the map using a Character Controller 0 Answers
Implementing falling: How to maintain forward inertia as I transition into a fall animation? 0 Answers
How to make player rotate 180° and run that direction with mecanim + vice versa? 1 Answer
Flying character rigidbody - can't see any static collider 1 Answer