I am using Direct Animation / Direct X in a scripting environment online ( Jscript ).
I have a Transform that is applied to a DAGeometry.
The Transform variable which is applied is:
var leftRotBvr = m.Until(
m.IdentityTransform3,
ev1,
m.UntilEx(
_rotLeft,
ev2.Snapshot(_rotLeft).NotifyScript("notifier1")
)
);
Now - notifier1 returns the same sort of thing:
function notifier1(edata, cur) {
newLRot = m.Compose3(
edata,
rotLeft
);
newBvr = m.Until(
edata,
ev1,
m.UntilEx(
newLRot ,
ev2.Snapshot(
newLRot ).NotifyScript( "notifier1" )
)
);
return newBvr;
}
Hence - when ev1 is triggered - the UntilEx fires as the event - and
_rotLeft is true - ( which applies a rotate3ratedegrees ).
When ev2 is triggered - the notifier1 function is run and the rotation
stops.
I want the rotation to ALSO stop if the object has rotated /to/ a certain
amount of degrees/radians ( ie if it has rotated to 50 degrees )
I can find no reference at all to how to work this out.
Is there anyway of testing the rotation of the object?
Failing that - would i need to keep track of the rotation constantly using
localtime ?
Thanks
Flawless





Bookmarks