Difference between revisions of "Talk:LlSetRot"

From Second Life Wiki
Jump to navigation Jump to search
(New page: Well Ive done some testing and its absolutely untrue that setrot is limited to down to a 6deg change. I'll include the code that I tested this with down to 1.5625 degrees. But its def not...)
 
(bug? physics prims not rotated.)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Well Ive done some testing and its absolutely untrue that setrot is limited to down to a 6deg change. I'll include the code that I tested this with down to 1.5625 degrees. But its def not limited to a 6deg increment anymore. so Im going to post a change on the page. I'll save the prior text here incase Im shown wrong but I think my code will show that Im not.
In SL Viewer 1.19.1(4) in a sim running 1.22.4.990499, this command does NOT rotate physics objects.


OLD: For small rotation changes, there is an update threshold of ~6 degrees, under which the sim will not send an update for the object to the viewer, though the object will be correctly rotated in the sim. You can change some other aspect of the object (like color, for instance), and it will force an update, however.
Here's the script I was testing:
 
<pre>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);
    }
}
</pre>
 
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!

Latest revision as of 12:18, 22 July 2008

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!