Search Unity

Unit behaviour depending on NavMesh layer

Discussion in 'Navigation' started by I_Love_Misato, Jan 28, 2015.

  1. I_Love_Misato

    I_Love_Misato

    Joined:
    Jan 14, 2014
    Posts:
    45
    Hi! I wondering if I can change the behaviour of the unit (i.e., speed, animation etc.) depending on the navigation layer? I could put triggers on the layers borders, but maybe, there is any better way?
     
  2. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,657
    Try calling SamplePathPosition, and look in the NavMeshHit structure it fills out for you to see which layers the agent is currently on or about to enter.