Character passing through static non-convex mesh colliders

arenoo

Member
My character can sometimes pass through static non-convex mesh colliders when trying to jump through them or fallilng on them from a side. What I mean by that is when you jump down on a vertical wall from one side and try to sprint through it when you are still in the air the player sometimes passes through the collider. I tried increasing the parameters in Collision tab on locomotion but it didn't seem to help. The regular colliders and convex mesh colliders work as expected though.
 
Hello, in the email you have said that the problem was with the mesh normals facing the wrong way and the controller version being old. I am sure that the mesh normals are correct now and I have updated the controller to the latest version. The character is still passing through mesh colliders as before. I have even maxed out the collision related variables in the locomotion component and it made little to no difference
 
I just looked at that support ticket and said:

There have been a lot of collision improvements since the version that you are using and when I tried your scene in the latest it works better out of the box. However, with that one wall in particular the raycasts can't find the collider. It's almost like the collision doesn't detect the wall at all, which is what happens when the normals are flipped, though I didn't look much beyond that at that particular mesh. If you choose the convex option for the mesh collider then it works correctly which also indicates that it's a collision normal problem.
I vaguely remember this and the new controller version helped a lot. With that said, there was one wall that the character could still go through and it was because of the normal direction. This is why the convex option works - it ensures the raycasts can hit the collider versus the non-convex option which depends on the normals. From my memory when I was debugging it the physics casts were not aware of your object at all which would be because of the created collider.

Instead of using the render mesh as the collider you could also use a simplified custom collider for your object. This will help ensure your normals are correct.
 
Hey Justin, I have just tried entering the same "broken" meshes using Atlas, the demo character, and I couldn't do it, which is a positive thing.
The setups between Atlas and my character seem to not differ at all. Can you please pinpoint a few things I could double check to make sure everything is set up as expected? (UltimateCharacterLocomotion Component is the same, copied over) Thank you.
 
Last edited:
Hmm, I'm stabbing in the dark but I would compare the following:

- Capsule Collider Settings
- Collider layers
- Character Layer Manager settings
- Ultimate Character Controller collision settings (though you said that it is the same)
 
Hey thank you for the tips.

It seems to have been a combination of many settings:

Firstly, the Angular Drag variable was set to 0 on the RigidBody.
Vertical Cast Buffer was also 0 in the UltimateCharacterLocomotion Physics settings.
The CapsuleCollider was fairly thin, 0.15 for the radius, instead of 0.4. The Center was also offset quite a bit.

Changing these seems to have fixed the collider issues for me. I will let you know if anything else comes up too.

Thanks again.

Edit: Question: Can I lower the Capsule Collider-s radius without affecting the collision checks? Because even on Atlas if I reduce the Capsule Collider-s radius enough it will start going through walls.
 
Last edited:
Back
Top