Cant get terrains to be variable height ie hills mountains valleys and the physics to match

Couldnt reproduce on playground because im using websocket to post terrain data

I think this issue raised is similar the exact thing im looking for becausse it looks like the terrain i have, the mesha nd physics dont match: Ammo Heightfield Terrain Shape
Also attempting to use Ammo and babylon

Ultimatly im trying to create variable height terrain like valleys mountains etc and have the character physics working and be able to move along it. Im not sure the best approach for it

can test here: http://104.248.56.144:8080/

IT has some sort of physics but the mesh doesnt match

1 Like

Hello and welcome :slight_smile:

Your link seems to be down.

You could try to put a piece of streamed data in a json and include the json in the code of the PG, if not too heavy :slight_smile:

Thanks :). I fixed it should stay online now and be able to view

I guess it is due to a heightfield and physics desync issue. You might need to ensure your Ammo.js heightfield shape matches the Babylon.js mesh resolution. Try debugging by visualizing the physics shape or adjusting the heightmap scaling.

Doing this builds character.

Yes seems so

I added

scene.debugLayer.show({
showPhysicsImpostors: true,
physicsImpostorColor: new BABYLON.Color3(1, 0, 0) // Red color for visibility
});

But it seems not to change anything. Is there a guide on how to visualize the physics mesh?