[Opensim-users] llTargetOmega : Bug or feature ?
Leal Duarte
ajlduarte at sapo.pt
Thu Jul 30 22:33:21 UTC 2020
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 at opensimulator.org
> http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users
More information about the Opensim-users
mailing list