I make a cube and create an animation that rotates it from 0 to 90 degrees in Y.
Now, I want that next time I play that animation it will add another 90 degrees instead of popping back to 0 and go to 90.
I looked at the docs and I found AnimationBlendMode.Additive.
Then all it says is “Description: Animations will be added” which looks like what I want but I can’t integrate it in may script. There’s no example… I need examples…
function OnGUI () {
if (GUI.Button (Rect (10,10,150,100), "Rotate Left")) {
animation.Play("RotateLeftAnim");
}
}
However, I’m not sure that’ll actually do what you want. I think that’ll just determine how to fade from one animation to the next if you use something like CrossFade… but experiment with it in case I’m wrong.
I believe when you animate, it doesn’t actually update the game object’s position or rotation, just the visual appearance. So you may need to manually rotate the cube prior to the second rotation animation.