la_piaga
10-13-2005, 02:40 PM
Hi there. I have to correlate the rotation of 2 objects (controller and object) within some defined properties, so hi have to catch the controller transormation to evaluate it and set the object accordingly.
first i tried with handlers with weird results; to make it short, take this script snippet as an example:
when transform $controller changes do ( print ($controller.rotation as eulerAngles))
Anyone can tell me why my controller rotation is being updated during transformation correctly only on X axis, having a bizarre behaviour on Y axis and not being updated at all on Z axis?!?
So i tried with the registerRredrawViewportsCallback mechanism and i found the controller rotation being updated correctly during trasformation but now the problem is in the destination object rotation setting. Even if i force the .rotation setting and a cache flushing at every callback the destination object is updated only at the end of the controller transformation.
Any suggestions? Thanks.
first i tried with handlers with weird results; to make it short, take this script snippet as an example:
when transform $controller changes do ( print ($controller.rotation as eulerAngles))
Anyone can tell me why my controller rotation is being updated during transformation correctly only on X axis, having a bizarre behaviour on Y axis and not being updated at all on Z axis?!?
So i tried with the registerRredrawViewportsCallback mechanism and i found the controller rotation being updated correctly during trasformation but now the problem is in the destination object rotation setting. Even if i force the .rotation setting and a cache flushing at every callback the destination object is updated only at the end of the controller transformation.
Any suggestions? Thanks.
