PhysX 3.2.1 Vehicle and HeightMap


I am creating a physX plugin for a game engine. My problem is that I’m facing a crash when Vehicle wheels collide with a terrain created using HeightMap. I don’t have this issue when using TriangleMeshes, and HeightMap is working well if I don’t use Vehicles. Is HeightMaps not compatible with vehicle?

Best regards.

Can you please confirm that you have called PxInitVehicleSDK before updating the vehicles? This can be a source of errors because uninitialized values lead to a divide by zero. If you have enabled the error stream then you should get a warning about this if PxInitVehicleSDK has not been called.

The other possibility is that the raycast against the heightmap has returned a bad value. You can test this by performing some raycasts yourself against the heightmap at the car’s coordinates to determine if the heightmap is returning good values or not. Heightmaps are supported exactly the same as any other shape.

Thanks, I will look into that.

Best regards.

PxInitVehicleSDK is called at the start of the plugin, and I think it is Ok because I don’t have any logged errors.

I also did some raycasts and they didn’t cause any errors.

What is strange is that it is just working fine when linked with the release build of the SDK (I used checked before). I will dig more into this and tell you if I find something.