Notifications
Clear all

[Closed] rotation,simple question

Hi:) I have got small question about rotation data in Max.
When for example I wrote in Listener

$Box01.rotation
(quat -0.229153 0.0568198 0.379853 0.894412) //<-Result

I thought that it will be another vector simple[rot.x,rot.y,rot.z).
I am a litte bit confused at that moment.
From the other hand

$Box01.rotation.x
-0.229153
$Box01.rotation.y
0.0568198
$Box01.rotation.z
0.379853

What is 0.894412 value?

5 Replies

what your listener line is giving you is a quaternion rotation.

What you are trying to do is set specific euler angles.

some backgroundreading for you

thanks for answers:) I was reading about the quaternion rotation.I found also http://www.3dbuzz.com/vbforum/showthread.php?171984-Max-script-rotate-an-object.Eventually I exported that kind of rotation data from blender.I am new in MaxScript and changing there rotation from euler to quaternion would be more problematic to me:)

I was too fast.
I have got problem all the time.
I have data from blender and Imported that in MAX.(vector rotO)
In listener I have got something like

$Cone.rotation (quat -0.00580174 -0.00595604 0.00193537 0.999964) 
rotO [0.663547,0.683797,-0.217825,-0.211375]

And probably because of that quat I can’t attribute data directly.

$Cone.rotation (quat -0.00580174 -0.00595604 0.00193537 0.999964) 
rotO [0.663547,0.683797,-0.217825,-0.211375] 
$Cone.rotation.w=rotO.w 
-0.211375
$Cone.rotation.w 
0.274414
 $Cone.rotation.w=rotO.w
-0.211375 
$Cone.rotation.w
 -0.214688 
$Cone.rotation.w=rotO.w 
-0.211375 
$Cone.rotation.w 
-0.211524

I am confused…

I am answering my own post.
I used eulertoquat (eulerAngles -rotO.x -rotO.y -rotO.z).Why there is “-” I do not know exactly but data exported from Blender need that:)