Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

moving character using position of FBX move animation?

Discussion in 'Scripting' started by cert, Jun 25, 2019.

  1. cert

    cert

    Joined:
    Feb 10, 2013
    Posts:
    24
    I want my 3rd person character to move to the position i clicked. I also want that my character climbs some small walls automatically. The easiest way to get a smooth animation when going from walking to climbing is to use the animation from the FBX. When the climb animation is finished, i'm setting the character position to the hips position and i'm done. Should i use the FBX position from my walk animation when my character walks?

    walking:
    1. start walking -> play walk animation
    2. walk animation finished a loop -> set character position to hips position
    3. if destination is not reached -> play walk animation again (2.)
    4. if destination is reached -> stop walk animation

    but this solution is ugly. Is there a better way to do this?
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,741
    The key words you're looking for are "root motion", and yes it is the ideal & accepted way to accomplish this. Googling that phrase should get you plenty of tutorials etc that will get you going.
     
    cert likes this.
  3. cert

    cert

    Joined:
    Feb 10, 2013
    Posts:
    24
    Thank you, this really helped me alot.