Two questions about rotating

  1. Is there some secret reason that means sprites can’t be directly rotated? I am curious.
  2. Could we change the word “rotation” in the collection editor to “rotation (euler)”, if that is what it is? It’s confusing, for me at least, that “rotation” in scripts is not the same as rotation in the collection editor.
1 Like

I don’t know about secret, but there’s probably a reason. One thing worth noting is that sprites, spine models and particle effect components can be rotated in the editor, but at runtime none of them can have their rotation modified, with less than a rotation of the entire game object. Why it is like that is something for @sven, @Johan_Beck-Noren or @Mathias_Westerdahl to answer.

The rotation fields in the Properties panel is always rotation around the three axis expressed in degrees. It wouldn’t make much sense to use radians or let you enter the values expressed as quaternion rotations as none of those are as easy to quickly type out (well maybe radians are).

You’re right, the thing I find confusing is that to achieve the same rotation in the script, you have to animate a property called Euler. animating “rotation”, has some other effect (possibly called quaternions??). The properties panel makes sense, the script is the strange part!

IIRC the main reason was to not have a separate tree structure where all components have their own transform. Game objects solve this problem. They are very light weight, and hold a transform, as well as the scene graph.

2 Likes

There are severe issues with euler rotations that quaternions solve nicely, that is why pretty much every (3D) game uses them for rotation. See https://www.youtube.com/watch?v=N5PDboNJwks

2 Likes