Search Unity

Relative Animation Problem

Discussion in 'Animation' started by V_endeta, Jan 16, 2020.

  1. V_endeta

    V_endeta

    Joined:
    Mar 31, 2017
    Posts:
    28
    I have a table 3d object with 3 drawers that can be opened with an input key. But the problem is when I start game second and third drawer have the same position as the first one because I created animation for that drawer. How can I create animation with a relative position?

    I try to use Apply Root Motion but the object is stuck and animations not working ...
    https://imgur.com/5erEnMW
     
  2. V_endeta

    V_endeta

    Joined:
    Mar 31, 2017
    Posts:
    28
    Solved with empty gameobjects (parent).
     
  3. Touhma_Slater

    Touhma_Slater

    Joined:
    Nov 19, 2014
    Posts:
    24
    can you elaborate ?
     
  4. V_endeta

    V_endeta

    Joined:
    Mar 31, 2017
    Posts:
    28
    Of course. Create an empty game object and put a drawer inside (with animation). Now drawer will have a position (0, 0, 0) - relative to empty game object. the animation will now work normally because the position is relative to the game object coordinates.
    https://imgur.com/ooRxuW2