Search Unity

Navmesh Rotation Orientatoin

Discussion in 'Navigation' started by ashtonstoop, Mar 12, 2015.

  1. ashtonstoop

    ashtonstoop

    Joined:
    Mar 12, 2015
    Posts:
    1
    I'm having trouble with aligning the orientation of my vehicle and the navmesh that it is following. The obstacle is oriented in the xy-plane, however, the surface of the terrain is bumpy and has hills. The vehicle will stay parallel to the xy-plane even when the terrain is not. How can I get the vehicle to rotate with the direction of the slope of the hills and bumps? (The vehicle is a cube with 4 x spheres for wheels)
     
  2. Jakob_Unity

    Jakob_Unity

    Joined:
    Dec 25, 2011
    Posts:
    269
    The navmesh will not orient your vehicle. It's generally the job of the physics system (terrain / wheel colliders) alternatively you can sample the normal of the terrain - depending on your specific use-case.