3 ms·
I don't think the Space Engineers thing is actually a bug, as opposed to just a counter-intuitive behavior. In the general case Euler coordinates work much clo
by munchbunny 10y ago
I don't think the Space Engineers thing is actually a bug, as opposed to just a counter-intuitive behavior.
In the general case Euler coordinates work much closer to our intuitions about rotation and orientation because the world we live in has a well-defined "down," as defined by gravity. Thus if you have a fixed "up" direction for the "camera", then any point on the sphere has a single corresponding orientation as long as you're not actually looking up/down (analogous to gimbal lock). This has the property that no matter what path your mouse takes, if you return to the same point, you will be oriented the exact same way you started.
This is not true with accumulating rotations in general. Try this with a paper airplane:
1. Hold it in the "flat" position at eye level and imagine the x, y, and z axis so that the x axis points out to the right, y points up, and z points down the tail and into your eye.
2. Pitch it 45 degrees nose up (counter-clockwise about the X axis).
3. Adjust your own perspective so that even though the plane is pitched up relative to the ground, you're looking at it as if once again x points right, y points up, and z points into your eye.
4. Now in this perspective, turn 45 the plane degrees counter-clockwise about the new Y axis. Note that this is not the same as "yaw", because new the Y axis you're using is actually 45 degrees off vertical from step #2.
5. Now without rotating the plane, reset your perspective. Notice how in addition to having pitched up and yawed left, your paper plane has also rolled slightly relative to the ground.
What you see in Space Engineers is probably this exact phenomenon. It's not so much a bug as it is a side effect of trying to come up with an intuitive rotation scheme when there is no "up".