Search Unity

How to get the current position of the navmesh agent position!

Discussion in 'Navigation' started by UNITY3D_TEAM, Oct 1, 2016.

  1. UNITY3D_TEAM

    UNITY3D_TEAM

    Joined:
    Apr 23, 2012
    Posts:
    720
    How to get the current moving position of the navmesh agent .?!.to find where its moving?
     
  2. rblkwa

    rblkwa

    Joined:
    Jun 20, 2013
    Posts:
    61
  3. UNITY3D_TEAM

    UNITY3D_TEAM

    Joined:
    Apr 23, 2012
    Posts:
    720
    bump any other suggestions?
     
  4. TWicked

    TWicked

    Joined:
    Nov 8, 2013
    Posts:
    14
    current moving position = agent.transform.position
    where its moving = agent.destination
    where agent is your NavMeshAgent.
     
    trybdyk and UNITY3D_TEAM like this.
  5. Thorskin

    Thorskin

    Joined:
    Oct 10, 2016
    Posts:
    13
    If you mean the position in the next frame, you can use agent.nextposition
     
  6. UNITY3D_TEAM

    UNITY3D_TEAM

    Joined:
    Apr 23, 2012
    Posts:
    720
    ok i try on this nextpositon and let u know how it works