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

How do i start an animation from the current rotation ?

Discussion in 'Scripting' started by amcneilly84, Dec 22, 2012.

  1. amcneilly84

    amcneilly84

    Joined:
    Aug 12, 2011
    Posts:
    8
    How do i start an animation from the current rotation ?

    In my flight game, I have a model that i apply a constant translate in z direction (forward) to simulate thrust. i have created two animations turn left and roll. The turn left animation is a series of rotations that cause the aircraft to turn left. The roll animation causes the aircraft to spin 360 on the z axis (forward direction).

    The turn left animation works perfectly as i expected. The problem is, when i play the turn left animation and then the roll animation. On playing the roll animation the aircraft snaps back to the original rotation (as if the aircraft never turned left)

    The issue, i assume is that on the roll animation Unity is playing from the absolute values for the rotation. not taking the current rotation values into account. How can i cause the roll animation to play from the current rotation ?

    I am using the legacy Animation system
     
    Last edited: Dec 22, 2012
  2. amcneilly84

    amcneilly84

    Joined:
    Aug 12, 2011
    Posts:
    8
    Is Unity not capable of relative rotation animations (delta) ?

    What is a better 3D game engine ? that can do this ?