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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

NavMesh and Pathfinding Rotation

Discussion in 'Navigation' started by browne11, Feb 4, 2016.

  1. browne11

    browne11

    Joined:
    Apr 30, 2015
    Posts:
    128
    Hi,

    I'm having some issues with my character not facing a target properly with setDestination(). I have used LookAt() to calculate the direction and this works great, but when an object is doing some pathfinding around an object it will slide and look at destination. I've removed LookAt for now.

    What I'm looking for is a way to only face the direction I'm moving in. Like Vector3.forward. I've checked all over google and just started in here but I was hoping someone may have a simple answer.

    Thanks
     
  2. browne11

    browne11

    Joined:
    Apr 30, 2015
    Posts:
    128
    I figured it out. Angular speed was set to 0. Turned that on and it would work.
     
    adrian-ilie likes this.