Non-mesh up-down-rotate Script

Since publishing my up/down script (that uses physics) and then following it with my up/down/rotate script (that uses llSetKeyframedMotion) I’ve had a few requests for a similar script that doesn’t need mesh – one of the conditions of the up/down/rotate script.  Well, its not easy and all the ways I have found so far have a limitation.

This post describes my experiments so far.

Adding rotation to physical movement

My first attempt was to simply use llTargetOmega with my up/down script, but unfortunately the llMoveToTarget function that is essential to the smooth physical movement appears to cancel out all llTargetOmega rotations.

Next, I took at look at the physical rotation function – llRotLookAt.  This stated to work a little, but whatever values I used for the strength and damping parameters, the rotation was unpredictable and tended to jump from 100 degrees or so straight over to 270-300+ degrees.  I never did find out why.

Then I took a different track, could an impulse be provided on each timer trigger to keep the object rotating?  Well yes, for small objects.  The resulting script used llSetAngularVelocity and worked ok, but when I tried new values for larger objects, it was very unpredictable.  If this might be of use, you can see it here:

Mixing non-physical movement with rotation

My final attempt rewrote my up/down script using non-physical movement, which is jerky as it involves periodically updating the position on a timer and the triggering of the timer introduces a minimum step motion each time.  The non-physical up/down is combined with a llTargetOmega rotation.  It kind of works, but will be affected by server lag and the rotation is not very smooth.

If this sounds of potential use, see it here:

Other ideas

There may be some option of combining llTargetOmega with real prim rotation setting (llSetRot, etc) to link smooth rotating with real position changing (like the smooth rotating door script), but that is a project for another day.


None of these touches the smoothness of the llSetKeyframedMotion script – but having to link your primset to a mesh object can seriously affect your prim count.  But then I guess LL would like things to be going this way.  So in summary you have the following choices of script from me so far:

  • Smooth up/down, no rotate
  • Mesh smooth up/down/rotate
  • Smooth, non-mesh, for small objects up/down/rotate
  • Jerky, non-mesh, non-physical objects up/down/rotate



~ by kimmpaulino on December 28, 2012.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: