Search Unity

NavAgents, Sprites and root motion

Discussion in 'Navigation' started by Grafos, Oct 19, 2015.

  1. Grafos

    Grafos

    Joined:
    Aug 30, 2011
    Posts:
    231
    Imagine plants VS zombies, but the level is an actual 3d environment and the zombies do not move in a straight line but navigate their way from point A to B.
    I was able to achieve this but not with root motion. Root motion is essential however, as without it my sprites seem to be sliding instead of walking. In short, how can I combine navigation, 2d sprites and root motion on a side view game?
     
  2. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Navmesh agents will navigate at the speed you put in their settings, you'll have to adjust your sprites animation speed depending on the agent velocity.
     
  3. Grafos

    Grafos

    Joined:
    Aug 30, 2011
    Posts:
    231
    Either you do not understand my question or I do not understand your answer.
    Speed of movement is not the issue here. It's a matter of controlling a 2d sprite that does not rotaste around its axis, using root motion and navmesh. All examples I've seen doing this, deal with a top vie camera and sprites that rotate to adjust direction of movement. But what about games such as Final Fight, Double Dragon etc.?
     
  4. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Nobody understand perhaps.
     
  5. Grafos

    Grafos

    Joined:
    Aug 30, 2011
    Posts:
    231
    What exactly confuses you in my question, it's pretty descriptive.