Anim8or Community

General Category => ASL Scripts => Topic started by: AlecJames on October 13, 2011, 01:37:47 pm

Title: Can I get the orientation of another item/object?
Post by: AlecJames on October 13, 2011, 01:37:47 pm
I've got a wheel in a scene that is rotating according to its own ASL script.  I have another 3 wheels that I want to all have the same orientation.

I tried putting in the controller script

$orientation = $MyMasterWheel.orientation;

but I get a script error "undefined identifier $MyMasterWheel".

MyMasterWheel is the oject name name in the scene object parameters.  Can I access another object in a script?  If so how?
Thanks
A
Title: Re: Can I get the orientation of another item/object?
Post by: AlecJames on October 13, 2011, 01:52:49 pm
Answered my own question :)

$orientation = GetAttributeQuaternion("MyMasterWheel","orientation");

Its in the manual under GetAttributeQuaternion.