Using the head look controller as a method to keep ship level with ground.

Well I want my ship I have built to stay level with the ground, and was wondering if I used the head look controller to tell the mesh on the underside of the ship to always be looking at the mesh under it, it would stay level. The only problem is that in this case it will always see terrain under it, but I want it to mimic the angle at which it is off the ground, ex/ going up a mountain it will reel up, and on the surface it will move up when it goes over a bump. It is leviating off the ground. Another method I thought may be possible was to have wheel colliders that were invisible, but this would give it a less sci fi feel.

  1. Do a raycast in -Vector3.up direction.
  2. Get the hitinfo.normal.
  3. Align your up vector with the normal.