- Home /
How to rotate an object using animation clip in opposite direction?
I am new to unity and I was trying use the animation window. I have a 2D platform that I want to rotate to 135 degrees. Each time I do the animation it rotates counterclockwise. How would I make it rotate clockwise?
Answer by PhantomSarcasm · Jul 26, 2016 at 02:02 PM
You might make a script in which you changed the flip of dersonaje or whatever you want. as a mirror. and it seems that it does to the other side. of course if you work with sprites or image (canvas).
This is the simple code serves to reverse the position if it is right or left
void Flip()
{
Vector3 theScale = transform.localScale;
theScale.x *= -1;//as you prefer on x or y. depending on the reflection that you need
transform.localScale = theScale;
}
He was sorry if you do not help
Your answer
Follow this Question
Related Questions
Sprite rotation with animation (2d project) 0 Answers
Counter is not working correctly with LeanTween 0 Answers
Duplicating and Tweaking Mecanim 2D Animations 1 Answer
Character still walking when no key is already pressed 1 Answer
FIXED - Editing animation clips gives NaN on rotation value 2 Answers