Dynamic mesh for player having climb up problems over heightmap terrain

I am dealing with this problem that is when the player collider walks down a heightmap, maybe a hole on the ground with a minHeight of 1, and when the player tries to climb up the heightmap, the gravity influence the player mass and can’t reach the planar zone of the heightmap level.
I try to solve this changing only the player gravity to -2, but i need to manually handle the slow falling gravity.
Maybe someone could found a more efficient solution?
I tried to set a friction to the player collider but doesn’t work.

Moved it to questions as there’s not a clear bug here. You should provide us with a Playground reproduction of what you have done otherwise it will be extremely difficult to guess at what’s going on your specific setup :upside_down_face:

1 Like

msfs1992.github.io find a negative level around the heightmap, you will see when you try to run up, the player moves weird to left or right trying to go forwards, it’s weirdo, i am trying to find the solution for this, for now the fastest solution is to use -1 +1 as min/max heightmap levels

Controlling a character on the ground using physics is a complex feature to get right as there are MANY tiny factors influencing the movement. We have plans of releasing a feature for our new havok physics API to make that easier, but it won’t come for a few months. You could look into non physical control which is much simpler to handle like Character Controller with Heightmap Ground - Tutorials and tips - Babylon.js (babylonjs.com)

1 Like

I solved this by 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