04-03-2007 15:21
It could be just me being silly but I have this code:
CODE
integer correction = (integer)(llRot2Angle(llGetRot()) * RAD_TO_DEG);

When my object has a Z rotation between 0 and 180, it gives me this angle.

When my object has a Z rotation between 181 and 360 then it actually returns a value of (360 - Z). So a Z of 190 will return a value of 170 instead.

Is this a bug, an undocumented feature or am I just using the wrong function to get this Z angle? :-)

(And all I need is the Z angle...)