You're only setting llTargetOmega in state_entry().
Note that if you put that script into the root prim of your linkset, the
rotation will be in region coordinates. Since you're only setting it once
during state_entry(), changing the orientation of the prim or linkset
should have no effect on the spinning axis. It appears to be behaving
properly based on your description and is not a bug.

According to http://wiki.secondlife.com/wiki/LlTargetOmega

Link Sets

   - If the script is attached to the root prim, the entire object rotates
   around the region
   <http://wiki.secondlife.com/wiki/Viewer_coordinate_frames#Region> axis.
      - If the object is attached then it rotates around the attachment axis.

   - If the script is attached to a child prim, the prim rotates around the
   local <http://wiki.secondlife.com/wiki/Viewer_coordinate_frames#Local>
   axis.
      - A child prim can rotate around its own axis while the entire object
      rotates around another axis



On Thu, Jul 30, 2020 at 3:33 PM Leal Duarte <ajldua...@sapo.pt> wrote:

> Hi
>
>      seems confusing viewer side effects
>
>      Ubit
>
>
> On 30-Jul-20 21:05, Jeff Kelley wrote:
> > Try the following :
> >
> > Rez a cylinder, throw this script in :
> >
> > default
> > {
> >     state_entry()
> >     {
> >         llTargetOmega ( llRot2Up(llGetLocalRot()), 1, 1);
> >     }
> > }
> >
> >
> > Now, edit the spinning cylinder. Change it's orientation.
> >
> > The prim continues spinning around what was his up axis prior to edition.
> >
> > Not quite surprising. Motion is client-side and client has not been
> > telled to recalculate the motion. Or should it ? Anyway, resetting the
> > script should fix things, yes ?
> >
> > No. Once the prim have been rotated manually, llTargetOmega will not
> > spin it again correctly.
> >
> > Bug or feature ?
> >
> >
> > Here is a work-around :
> >
> > Force rotation to current value with llSetRot. As this won't work
> > (cache effect ?) , force it to a slightly different value, then to the
> > desired value again. Wait a short time between (i guess updates are
> > coalesced).
> >
> > default {
> >
> >     state_entry() {
> >         rotation rot = llGetRot();
> >         llSetRot (rot + <0.01,0.01,0.01,0.01>);
> >         llSleep (0.1);
> >         llSetRot (rot);
> >
> >         llTargetOmega ( llRot2Up(llGetLocalRot()), 1, 1);
> >     }
> > }
> >
> >
> > Any thoughts ?
> >
> >
> >
> > -- Jeff
> > _______________________________________________
> > Opensim-users mailing list
> > Opensim-users@opensimulator.org
> > http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users
> _______________________________________________
> Opensim-users mailing list
> Opensim-users@opensimulator.org
> http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users
>
_______________________________________________
Opensim-users mailing list
Opensim-users@opensimulator.org
http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users

Reply via email to