Issue with Character Falling Through Ground in Havok Physics

I’m using Havok Physics and have created a basic character controller for jumping, walking, etc. I let a few different players playtest it, including those on low-end PCs. When I reviewed the recorded playtest sessions, I noticed that some players went through the ground after jumping/landing to the ground.

I know this issue can occur in physics engines, but the character doesn’t run or jump fast, so I assume it’s happening on low-end PCs, which are barely getting ~30 FPS.

How can I resolve this issue? I remember some others had a similar problem on the forum, but in those cases, their objects were moving fast. That’s not the situation in my game. I’ve even reduced the player’s speed, but this might still happen again.

I can’t reproduce the issue myself so can’t share a PG here.

Try adding thickness to your ground plane. If my theory is correct, “jumps” in physics’ deltaTime increase the size of the impulse applied to bodies from gravity. This impulse, according to my theory, moves the body a greater distance through the ground than the height of the body.

2 Likes

I second @HiGreg
I also insist in working on a PG so it can help eliminate side effects or code that can introduce bugs. Basically, if a PG, with all the features enabled, doesn’t show the bug then the bug might happen in a place you didn’t think about.

2 Likes

Thank you for confirming!

In my Physics Debug code showing CONTINUED contact impulses in yellow, is there value in showing the aggregate imparted delta linear velocity? I would expect dV*dT to be greater than the height of the object when the object falls through the ground. In fact, any time that any component of the aggregate dV*dT is greater than the bounding box of that object, there is a chance that the object would go through a nearby plane.

If all this is true, code could detect this by tracking the effective delta position on each physics step and flag when any axis component exceeds the bounding box’s corresponding axis. The amount of excess would be the recommended thickness of all objects that it collides with. This would be a straightforward addition to my Physics Debug class.

1 Like

Also, I came across How to enable faster moving rigidbodies in HAVOK?, where @eoin mentioned;

“This default limit is not due to objects going through each other, as we always use continuous collision detection.”

So, in any case, we should be safe? Also are there any parameters needed to be set like CCD to true etc?

Safe from what? And when doing what? An object will pass through another if the delta position in one step is bigger than the other object.

Yes?