Hi everyone,
I’ve just started learning about unity recently and am currently working on a simple puzzle game. What I’m trying to do is to rotate a cube 90 degrees when user presses on a button. For every time user presses the button the cube should rotate 90 degrees. For that I have made an animation that rotates an empty game object by 90 degrees. When user presses a key I add the cube that I want to rotate to the rotation game object and play the animation
The problem that I’m running to is that every time I run the animation the cube’s transform resets to its original state so I can never rotate it more than 90 degrees.
My question is, is my approach correct? Is there anyway to make it so that the animation transformation gets applied on top of current transform, so that for example playing it twice would rotate my object 90 degrees?
Any help would be greatly appreciated.
Thanks
Sina