Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Using parameters/variables as value in Animation

Discussion in 'Timeline' started by msmithUnity, Nov 26, 2018.

  1. msmithUnity

    msmithUnity

    Joined:
    Jun 19, 2015
    Posts:
    12
    Hi,

    I have an animation, which controls around 5 different game objects. One of them I need to rotate x by a number of degrees, but I don't know at compile time what that number will be as it changes. Is there a way I can specify in code the number of degrees to rotate and then have the animation use that value? I was thinking maybe I could use an animation parameter, but I don't see how to tell the animation to use the parameter as a value for rotation.

    Thanks