Hi all,
I’ve found the following code from one of the Playgrounds. The issue is, I’m using the Havok Physics engine and I need to add a rigid body to my terrain, which is created from a height map. Unfortunately, PhysicsShape doesn’t seem to have a specific type for height maps or terrains.
var ground = BABYLON.Mesh.CreateGroundFromHeightMap("ground", "textures/heightMap.png", 100, 100, 100, 0, 10, scene, false, () => {
ground.physicsImpostor = new BABYLON.PhysicsImpostor(ground, BABYLON.PhysicsImpostor.HeightmapImpostor, { mass: 0, friction: 0.0, restitution: 0.7 })
})