Search Unity

Animate movement based on scale

Discussion in 'Animation' started by OstrichDog, Jul 20, 2019.

  1. OstrichDog

    OstrichDog

    Joined:
    Jul 2, 2019
    Posts:
    6
    I have a door that opens vertically with an animation that changes its y to -6 (the door has a y scale of 6). What if I want to make the door bigger, say with a scale of 14? It only moves down of 6 units, how can i make it go all the way down to its bottom?

    EDIT: i found a way to do it. Basically i put the door in an empty father, and i give the dimensions i want to the father, while the door stays with (1, 1, 1). In the animation, i simply move the door from 0 to -1 to open and from -1 to 0 to close
     
    Last edited: Aug 4, 2019
  2. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    660
    Just multiply the movement by the increased scale? Im thinking?...
     
  3. OstrichDog

    OstrichDog

    Joined:
    Jul 2, 2019
    Posts:
    6
    And how can i do that in an animation?
     
  4. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    You can't.

    Just use a script to move the object.