Hey all, really appreciate all the hard work that’s gone into Babylon! Been enjoying my time with it.
I’m currently trying to create an undulating terrain with a sphere on it (so essentially over time the height of the terrain changes according to a simplex noise function). I managed to get it to render correctly, but I’ve been having difficulties with the physics part of it.
I’m using a ground mesh and modifying the y value of the vertices from the vertex data.
When I create a HeightmapImpostor for the terrain and call the impostor.forceUpdate() function after I update the mesh, the sphere bounces around a bit then goes through the terrain. Everything works properly when using a MeshImpostor, but as to be expected it’s rather slow, and the PhysicsViewer does not show the shapes of the Mesh/Heightmap impostors so I’m not quite sure what’s happening.
What would be the proper way to update the HeightmapImpostor for a terrain that changes every frame? Is this even performantly realistic with the physics engines, or should I try and roll my own “physics” approach for this? (I just need the ball to roll around the terrain in a way that’s reminiscent of proper physics, but I have no idea where to get started with that)
Any advice would be appreciated!