Hubs-Foundation / Spoke

Easily create custom 3D environments
Other
653 stars 256 forks source link

Rotating Media Frame elements around z-axis actually rotates around x-axis #1088

Open brookbowers-uga opened 3 years ago

brookbowers-uga commented 3 years ago

I'm not sure if this is an issue with Spoke, or an issue with how Media Frame elements interpret rotations, but it appears that applying a z-axis rotation in Spoke to Media Frame elements actually applies an x-axis rotation. Z-axis scaling works appropriately.

Image from Gyazo

rawnsley commented 3 years ago

I think this is just classic gimbal lock because you have applied a 90° rotation around the Y-axis.

brookbowers-uga commented 3 years ago

I understand what you're suggesting, and here's the same rotation attempt in Unity (with desired results):

Image from Gyazo

So, I guess this would be better served as a feature request? I would prefer to be able to specify the rotations separately in order to more intuitively arrive at the composite final result.

rawnsley commented 3 years ago

This particular combination only works in Unity because of the order that rotations are applied (ZXY in Unity). You can see the same problem in a different way if you set the X rotation to 90° and then modify Y or Z - they will both have the same effect (i.e. they are gimbal locked).

I'm not sure what order the rotations are applied in Spoke, but it is probably the default for their graphics library three.js, which is XYZ.