Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006440opensim[REGION] Script Functionspublic2012-11-18 15:502012-11-18 16:02
ReporterKayaker Magic 
Assigned To 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0006440: llSetLocalRot and llSetRot should be identical in the root prim of an attachment
DescriptionAccording to the Wiki in several places, ( [^] and [^]) the effect of llSetRot and llSetLocalRot are identical for the root prim of an attachment. llSetLocalRot seems to work correctly, but llSetRot does something incorrect.
Steps To ReproduceMake a prim, paint the +X face red so you can tell which way is forward. Wear this prim on your pelvis. Place the script below into the prim. It should orbit your avatar and correctly turn in the direction of motion using PRIM_LOCAL_ROT. Then comment out the PRIM_LOCAL_ROT line and uncomment the following PRIM_ROTATION line. In SL the script continues to rotate correctly. In Open Simulator, the prim rotates in some random way. I thought perhaps PRIM_ROTATION was expecting a global rotation and tried to supply this with the grot value, but this did not rotate correctly.


  Detect when attached and switch to PRIM_ROT_LOCAL. This is unfortunate since PRIM_POSITION expects local positions when in the root of an attachment, it would be nice if PRIM_ROTATION worked in the same way. Which it should for compatibility with SL.


  Please don't tell me there are easier ways to make things rotate in a circle. I do not want to rotate in a circle, I only use that as a quick example.
Additional Information//attached motion and rotation test
rotation ten;

        vector start=llGetLocalPos();
        vector end=start*ten; //circular motion, just for testing
        vector fwd=llVecNorm(end-start);
        vector lft=<0,0,1>%fwd;
        rotation rot=llAxes2Rot(fwd,lft,fwd%lft); //local rotation from local position
        rotation grot = rot*llGetRootRotation(); //try converting to global rotation
            PRIM_ROT_LOCAL,rot //local rotation works
// PRIM_ROTATION,rot //should be same as local, IS NOT
// PRIM_ROTATION,grot //If this is global, this should work, DOES NOT
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (Multiple Regions per Sim)
Physics EngineODE
Script Engine
Mono VersionNone
Attached Files

- Relationships

-  Notes
Kayaker Magic (reporter)
2012-11-18 16:01

Added a clarification, it is not the motion of the prim that is incorrect, it is the rotation that fails to work correctly when using PRIM_ROTATION or llSetRot.

- Issue History
Date Modified Username Field Change
2012-11-18 15:50 Kayaker Magic New Issue
2012-11-18 16:01 Kayaker Magic Note Added: 0023162
2012-11-18 16:01 Kayaker Magic Steps to Reproduce Updated View Revisions
2012-11-18 16:02 Kayaker Magic Steps to Reproduce Updated View Revisions

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker