Jump to content
Sign in to follow this  
KecskeShajt

LSL function that retrieves / limit rotating?

Recommended Posts

Hi!

I have some problems with rotating

 

I would like to trigger an event (loop a sound, while an object rotating (linked object, nonphysical, and not rotating by llTargetOmega).

So the best would be to get something like  integer isrotating = TRUE or FALSE

But I also thought if that is not possible, to get the value of the rotation of the z axis and trigger the even if the rotation value changing (so decreasing -- of increasing ++)

Any of these are possible?

Also there is a way to limit of the rotation of an axis, so stop at between two angles?

Share this post


Link to post
Share on other sites
Posted (edited)

You'd moste likely have to run a timer that compares the object's rotation with the last stored rotation and basically if the rotation is the same -> not rotating, if the rotation is different -> rotating.

If the object is using llTargetOmega i believe you can use llGetOmega to fetch the current angular rotation.

If the object is physical, llGetTorque might help.

 

Your explanation makes it sound, to me like the movements are controlled by another script, why not simply have that script tell you if it is rotating the object or not?

Edited by Kyrah Abattoir

Share this post


Link to post
Share on other sites

Well, it is  rotating by llSetLinkPrimitiveParamsFast(2,[PRIM_ROT_LOCAL,<0,0,rot.z,rot.s>]);

So just moving around the z axis

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...