Search Unity

Question Is there a way to know if a NavMeshAgent is avoiding an obstacle?

Discussion in 'Navigation' started by DiegoDePalacio, Sep 6, 2022.

  1. DiegoDePalacio

    DiegoDePalacio

    Unity Technologies

    Joined:
    Oct 28, 2009
    Posts:
    507
    I'm currently developing a custom implementation for having vehicle-like behaving agents.

    The agents are tanks using neutral steering transmission (basically rotating in place with no movement) when the angle between their steeringTarget and their `transform.forward` vector is higher than a certain angle (to avoid sliding).

    However, I don't want them to use their neural steering transmission if they're in the middle of a NavMesh process of avoiding an obstacle.

    Is there a way to query if they're avoiding an obstacle?

    Thank you in advance for your help!