Search Unity

Making a character in a boat row left or right depending on direction of navmesh agent?

Discussion in 'Navigation' started by frogwise, May 23, 2018.

  1. frogwise

    frogwise

    Joined:
    Nov 27, 2009
    Posts:
    103
    I have a little character in a rowboat. The game is a simple click-to-move game using a NavMesh agent for the boat.

    If I make 3 animations:

    1. 1. row left
    2. 2. row right
    3. 3. row both

    Could I set it up so that when the boat is rotating right, the row left animation is playing, when rotating left, the row rightanimation is playing, and when moving forward, the row both animation is playing?

    Thanks in advance!
     
  2. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    This is how most characters work: one animation for from-to-back, one for strafing left and one for strafing right. Set your motion to an animation parameter.