I’m making a little library to help folks used to Scratch get started with Unity (especially Unity 2D).
One trick Scratch does is, each sprite can have any of three different “rotation styles.” This effectively separates the way the sprite is drawn on screen from its logical direction (i.e., the direction the sprite moves when told to move forward). In the “all around” style, the sprite image rotates to face its direction. In “left-right” style, it just flips (mirror across X) for directions that are mostly left, and draws normally for directions that are mostly right. And in “don’t rotate” mode, the sprite image doesn’t rotate or flip at all, regardless of direction.
These modes are really handy.
So now I want to do something similar in Unity. My best thought so far is to just make a separate “direction” property, utterly independent of the transform, and be careful about which code changes the direction vs. mucking with the transform.
But I’m still quite new to Unity’s 2D stuff, so I thought I’d ask… is there something like this already built in?
Thanks,
- Joe