Keeping a vehicle on the ground

I want to have a vehicle move through my scene whilst staying on the ground. The getHeightAtCoordinates() method of the GroundMesh mostly returns NaN in my scene, and this is discussed in other threads, so I tried scene.pickWithRay(ray) instead, which sometimes works and sometimes the ray hits the vehicle before it hits the ground (I tried firing the ray both downwards and upwards) causing strange vehicle behaviors.

I currently don’t use physics, and enabling it just for collision detection with the ground mesh seems like an overkill.

Are there any other techniques that can be used to keep a vehicle on the ground as it moves?

Welcome aboard!

You could pass a mesh predicate to pickWithRay to avoid checking with the vehicle?

Yes, that works. Thanks.
I also discovered that the mesh itself has methods to pick points on the mesh using a ray. This is more efficient than running through all the meshes in the scene and picking out the ground mesh using a predicate function.