When porting my flightsim from 4.2.1 to 5 I ran into a couple of issues. Here is one:
HeightmapImpostor on a
GroundMesh seems to corrupt it’s ability to ask for a height at a certain
(x,z) position using
- just after creating
HeightmapImpostor, heights can be successfully asked for
- after a rendering cycle, the values retrieved by
- asking for
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,