Character walks into hills of terrain

Hi, I have a third-person view character and I followed generating terrain from a heightmap tutorial. The character walks into some parts of the terrain. I suspect that it has to do with the subdivisions parameter - when I set it too high I rarely see this behavior.

Any ideas to resolve this issue?


@Ertugrul_Cetin Have you applied a collision of type mesh to entire terrain as well as Rigid body? It appears that the starter plane is still there but the rest does not have the collision. How did you make the terrain?

If that’s not the case, and that’s a mesh collider then most likely that’s a known Ammo.js issue. Long triangles like terrain meshes have can cause that behavior with a capsule collider.

Possible workarounds:

  • Use a sphere collider.
  • Use Ammo3, I can verify this problem has been solved in that version though there is no official release right now. You will have to find the PR and build Ammo.js with Bullet3.

Here: PlayCanvas | HTML5 Game Engine

Thank you!

Hey Leonidas, do you have the building version of Ammo.js for Bullet3?

Okay anyways, I found it, sorry about the ping

1 Like

Yes, it was in one PR, I think that was it.

Also @LeXXik has been building it lately, he may be able to share the exact steps to build your own.

1 Like