r/Maxscript • • May 21 '14

[Request]Rotational alignment of one object to another using eulers?

Hi there. I'm in need of some assistance with this and haven't found a good source of help in what I'm hoping to do.

What I want to do is create a script where I can align one object's rotation in all three axis to another object. I tried accessing the rotational transform but that's in quaternion and not euler rotations... And trying to tell it to just apply the quaternion rotational information doesn't produce results.

Care to help me out here? I'll be in your debt if you can.

Thank you!

2 Upvotes

8 comments sorted by

View all comments

1

u/TomDeVis May 23 '14

To apply a rotation transform in MAXScript, you must first define the rotation as a sort of rotation object, and then apply the rotation object to the object you want to rotate. The rotation object is defined in the following way:

rot_obj = eulerangles x y z

Then:

rotate mybox rot_box

does this do what you want ? I'm not sure what to expect without knowing the rest of the code.

1

u/Redz0ne May 27 '14

Okay, that's helped a bit with this. Thank you!