Hi all!
When porting my flightsim from 4.2.1 to 5 I ran into a couple of issues. Here is one:
Using a HeightmapImpostor
on a GroundMesh
seems to corrupt it’s ability to ask for a height at a certain (x,z)
position using getHeightAtCoordinates()
.
- just after creating
GroundMesh
andHeightmapImpostor
, heights can be successfully asked for - after a rendering cycle, the values retrieved by
getHeightAtCoordinates()
are corrupted - asking for
getHeightAtCoordinates(0,0)
even crashes
I created a PG showing the effect, please look for the console:
PhysicsImpostor.HeightmapImpostor destroys getHeightAtCoordinates() | Babylon.js Playground (babylonjs.com)
Maybe related to a recent bug Fxi heightmap impostor with Cannon by CedricGuillemet · Pull Request #12818 · BabylonJS/Babylon.js (github.com) ??
Additionally I found that asking for getHeightAtCoordinates(-99.9,-100)
on a 200x200 heightmap crashes; regardless of HeightmapImpostor
being used. That’s also demonstrated in the PG.
Hope for help,
. Jörg