- Home /
2D Sprite Animation - Rotate animation on axis
So, I have no script to reference with this problem, as I'm a little stumped on how to do this. I have an object that lays flat on the ground until the player enters a boxCollider2D set as a trigger. When the player enters the trigger, the object is set to animate. The animations resting position is flat on the ground, when it's animated it should rotate to a standing position. The feet of the object should stay in the same position, this is the part I'm stuck on. Any ideas at all would be much appreciated. Hopefully this makes sense D:
Could you provide a diagram of what you're trying to accomplish since you have no code for it?
$$anonymous$$y artist is asleep otherwise I would try to get his permission to post his art for this question >_<. So, essentially the red part of the line would stay in the same position while it rotates upwards.
Answer by Pyrian · May 06, 2014 at 12:38 AM
You need to set the Sprite's Pivot to the center of the red dot (or maybe just the bottom left would work in this case). That way, it'll rotate based on that dot, instead of on its center. This is done in the Sprite asset itself, usually in the Sprite Editor.
Your answer
Follow this Question
Related Questions
2D sprite animation issue 0 Answers
Rotating a specific axis towards a object 3 Answers
Sprite rotation with animation (2d project) 0 Answers
Sprite animation 2 Answers
How to make not smooth animation? 0 Answers