Determining the alignment of terrain

Hello Monkeys,

I have a four wheeled vehicle located at point P1(x,y,z) and facing point P2(x,y,z) and I want to rotate the vehicle ;ie vehicle.setPhysicsRotation(Quaternion q) so that all four wheels are on the ground.

What’s the most efficient way to find q ?


Did you look at this?

Thanks Normen, very useful