there is a function which does exactely this. it's named "SLERP" (
spherical linear interpolation)
'-----------------------------------------------------------
'create three nulls and rotate them how you like and then run the script
set n1 = dictionary.getobject("null")
set n2 = dictionary.getobject("null1")
set n3 = dictionary.getobject("null2")
set t1 = n1.kinematics.global.transform
set t2 = n2.kinematics.global.transform
set t3 = n3.kinematics.global.transform
set q1 = XSIMath.CreateQuaternion
set q2 = XSIMath.CreateQuaternion
set q3 = XSIMath.CreateQuaternion
t1.GetRotationQuaternion q1
t2.GetRotationQuaternion q2
q3.slerp q1,q2,0.5
t3.SetRotationFromQuaternion q3
n3.kinematics.global.transform = t3
'------------------------------------------------------
hope this helps
Bernard Lebel wrote:
Hello,
I'd need some guidance here. Say I have 3 objects. I want the third
object to get the rotational difference between the first two.
In a simplified example, the first object has rotx 25.0, the second
has rotx 15.0, so I'd want the third object to get rotx of 10.0.
I'm not sure at all where to go from there, using the XSI math
objects. Do I have to perform a subtraction for every axis of the
rotation?
Thanks
Bernard
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi
--
Vladimir Jankijevic
3D / Animation
frame eleven ag
Schiffbaustrasse 10
8005 Zurich
tel +41-1-444 34 44
fax +41-1-444 34 45
vladimir.jankijevic(at)frame-eleven.com
www.frame-eleven.com
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi