[Opensim-users] llTargetOmega : Bug or feature ?
Jeff Kelley
opensim at pescadoo.net
Fri Jul 31 00:15:51 UTC 2020
At 10:08 PM -0700 7/30/20, Dahlia Trimble wrote:
>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.
This is a single prim and, although the specification does not
explicitly state that it should rotate around the prim's axis
(mentioning linksets as an exception), this is observed and desired
behaviour.
I fail to understand when i should call llTargetOmega outside
state_entry(), since resetting the script at any time re-issues the
call.
Invoking llTargetOmega on touch_start() makes no difference, except
if you take care to stop the rotation first, rotate the prim
manually, then restart rotation.
integer spinning = FALSE;
default {
touch_start (integer n) {
if (spinning = ! spinning)
llTargetOmega ( llRot2Up(llGetLocalRot()), 1, 1);
else
llTargetOmega ( ZERO_VECTOR, 0, 0);
}
}
I admit that rotating a spinning prim manually is not a useful nor
desirable thing. It happened accidentally in development, when I
tested the whole thing for different orientations of "the wheel".
-- Jeff
More information about the Opensim-users
mailing list