Need Help or Information

My character has colliders on all parts of the skeleton , collision works well when moving with character controller . but when i play an animation , the character is going through objects . but the character has colliders on each part of the skeleton . and they aren’t with rigidbodies just box and capsule colliders . what is the problem and what might be the solution? using unity 2021.3.51f

Hi Mahiro,

In which course and lecture are you?

Hi Nina,
Thanks for replying and I’m converting the Rpg course to third person controller. but I am having the problem I described when I play an animation that doesn’t move with the character controller. the colliders on each skeleton on the player don’t collider with any colliders in the scene. but collision works with the character controller. would you have any idea on how to overcome the problem. I checked the collision matrix. increased physics rate. I even wrote a collision script to handle it but the script is not working when I play those animations.

Unfortunately, I have basically no experience with animations. I’ve just added a tag to your thread. Maybe @Brian_Trotter will be able to help you with this problem. :slight_smile:

Try adding a rigidbody to the character.

Without a Rigidbody on at least one of the two colliders involved in a collision, there can be no collission or trigger. The Rigidbody does the calculations, the colliders are just data defining boundaries.

Hi Brian,
I added them and made the collision continuous, but it is still passing through the collider. Am i still missing something?

Hi bixarrio,
I have added the rigid body both on the main player transform and the individual colliders on the skeleton bones and made the collision continuous but it is still going through the collider in front of it when animation starts playing

Thank you Nina!.

Even if a collision is registered, the animation won’t care, it will push the model right through. That’s actually part of why we turn the animator OFF when we ragdoll the character.

We don’t want to our movement to be based off of the Animator, because what the animator does not bring with it is the CharacterController. We want our movement to be entirely based in CharacterController.Move(). To achieve this, with some animations we need to strip the animations of it’s root motion. If you’re downloading the animations off of Mixamo, an easy way to acheive this is to click the “In Place” button before downloading the animation.

In the case of animations you already have, you can strip the motion for by clearing the keys for the hips transform (make a duplicate of the animation first, then edit it). Nathan goes through this procedure in the lecture Jumping and Falling.

Thank you, now have another way of thinking about this. I will try that!. maybe the animation is moving in the X-Z transform so will stop it.

Privacy & Terms