Seite 1 von 1

MaxScript: Angle as Euler! No quaternion, no matrix!

Verfasst: 06.11.2006, 15:24
von Simon

Code: Alles auswählen

quatToEuler $object.controller.rotation
BETTER way to grab the rotation. I had the case that i got wrong values when i just use $.controller.rotation

Code: Alles auswählen

$.rotation.x_rotation.controller.value
$.rotation.y_rotation.controller.value
$.rotation.z_rotation.controller.value
With that you get Angles - but not the correct ones. You need to substract them with 180°. Then you will get the correct angle in euler degrees!

fuck of quaternions :D

Another possibility to get the c orrect angles (euler) is to use "transform":

Code: Alles auswählen

quatToEuler $.transform.rotation
ADD:

Rotate Object via EulerAngle:

Code: Alles auswählen

rotate $object (eulerangles 0 30 0)
Topic in Maxscript help: "Applying Standard Transformations"

Code: Alles auswählen

$BoxGizmo01.rotation = eulerangles 34 0 0
When the objects is flipping around the center of the scene, try this thread: http://www.3dbuzz.com/vbforum/showthrea ... -an-object:

Code: Alles auswählen

Object.rotation.x_rotation = X
IK Controller Rotation

Code: Alles auswählen

quatToEuler $.transform.rotationpart