Havok physics wlaking character bouncing over heightmap

the player have a small laggy bouncing, someone could help me to get a stable movement?
:slight_smile:

this is the BG of a player waking over a non heightmap, and the movement is fuild without that laggy bouncing. https://playground.babylonjs.com/#Z8HTUN#458

To minimize bouncing, a good first step would be to change the dummy’s PhysicsShapeType to be BABYLON.PhysicsShapeType.CAPSULE instead of a box. That should make a noticeable difference.

I think the rest will require fiddling with different friction, restitution, or mass values of the dummy & ground.

Maybe @Cedric or @carolhmj can give a better answer :slight_smile:

1 Like

changed to CAPSULE is better now, thanks :slight_smile:

1 Like

It’s because the edges of the box shape collided with the vertices/triangle edges of the mesh shape.

If you open Inspector, go to debug tab, you can turn on physics viewer to see what happens :slightly_smiling_face:

2 Likes

reducing the heightmap subdivisions stabilish the player

I end up using ammo’s kinematicCharacterController
The only bug that remains is that when the player collides the table he step up over the table without jumping, the table have mass of 0, if you collide the barrel it will not happens because the barrel is dynamic, and if you collide with the wall it will not happen because the wall is too tall.
I want to find out which is the parameter of kinematicController that prevents this behaviour

msfs1992.github.io