Talk:LlSetRot

From Second Life Wiki
Revision as of 12:18, 22 July 2008 by Udge Watanabe (talk | contribs) (bug? physics prims not rotated.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In SL Viewer 1.19.1(4) in a sim running 1.22.4.990499, this command does NOT rotate physics objects.

Here's the script I was testing:

default
{
    touch_start(integer total_number)
    {
        vector attitude = llRot2Euler(llGetRot());
        string msg = "Object attitude\nBefore: "+(string)attitude+"\n";
        attitude = <0,0,0>;
        llSetRot(llEuler2Rot(attitude));
        attitude = llRot2Euler(llGetRot());
        msg += "After: "+(string)attitude;
        llOwnerSay(msg);
    }
}

Make a prim, put in script, rotate prim, click on it -> Prim returns to upright.

Make the prim physical, repeat the above -> Prim is NOT rotated back to upright.

Is this a bug, or am I misusing the function? And if the latter, could somebody please put me right? Thanks!