Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How to get turn direction of a NavMeshAgent?

Discussion in 'Navigation' started by TareqProjects, Nov 21, 2016.

  1. TareqProjects

    TareqProjects

    Joined:
    Jun 27, 2016
    Posts:
    55
    Hello,

    Is it possible to get the turning direction as a NavMeshAgent approaches a waypoint? I was trying to think of ways I could have a car-indicator system. I thought I could use the gameobject's rotation value but it was a bit unrealiable since I have objects spawning with different rotation orientation.

    Thanks
     
  2. Jakob_Unity

    Jakob_Unity

    Unity Technologies

    Joined:
    Dec 25, 2011
    Posts:
    269
  3. TareqProjects

    TareqProjects

    Joined:
    Jun 27, 2016
    Posts:
    55
    We call them indicators but they're basically turn signals; the yellow blipping lights on a car that let's other drivers know that you're turning into another street/changing lanes. I wanted to know how I can recreate this, ideally before the car turns around the corner.