Report this content
We want the Dreams coMmunity to be a safe, diverse and tolerant place for everyone, no matter their age, gender, race, sexual orientation or otherwise. If you believe this content to contradict these principles, you can file a report for our coMmunity teams to investigate.
Note that misuse of the reporting tool will not be tolerated.Item being reported:
I've just been studying how the X, Y and Z rotations from a tag's Scene Space Transform behave and either there's some strange magic that I don't understand when it comes to 3D rotation or it just doesn't work correctly.
I suspect that maybe this is being converted from a quaternion and the conversion has been messed up but I'm certainly no expert on how that works so it is only a guess.
Try the following and if you can explain it, I'd be very grateful as I'm trying to work with the data on my current project:
1. Stamp down a shape with an obvious front and back so you can see the rotations. A thin, stretched wedge is good.
2. Microchip it and tag it. On the tag axes, set the Z to front and Y to up. X will be pointing left.
3. Give it a Controller Sensor and Advanced Rotator, set to world space. Make sure the rotators axes match the tag's. Hook your left stick (page 2 for camera relative) so your stick's Y is rotating around the X axis and your stick's X is rotating around Z. Now let your right stick's X output control the Y axis rotations.
3. Bung down 2 splitters and 3 sliders in the space somewhere you can see them clearly. Plug the tag's Scene Space Direction into the first splitter. Then from there, plug the Orientation A, B and C (or X, Y and Z, can't remember which) into your 3 sliders. Make sure the sliders have at least -360 to +360 range.
4. Go into Test. Pull back on the left stick and watch the X rotation slider. All seems well. Vertical is 90 degress and half way up is 45.
5. Go back to straight and level.
6. Now use your right stick to rotate 90 degrees to the right, so you're nose is facing right. You can see from your Y slider when you hit 90.
7. Once again, use the left stick to go vertical. Pull it left to raise the nose until your wedge is pointing straight up.
8. Voila, vertical is now 70 degrees! And you'll also notice that it says your Y rotation is also now 70 (while in fact it should still be 90) and you've rotated 70 degrees around your Z axis, when in fact you haven't rotated around the Z axis at all.
If you can tell me how to work with that, I'd be impressed, and very grateful. No wonder the trig stuff I've been trying falls flat on it's face!