Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Detecting Physical Stop

Lazink Maeterlinck
Registered User
Join date: 8 Nov 2005
Posts: 332
02-13-2009 13:17
Searched the forums, and I might have the answer, but thought I'd ask anyways.

I have a physical object that I want to detect if someone has made it stop by editing the object. Since I only want to do this while it's spinning (yeah I know it moves slightly, but not too worried about that part) I was thinking the solution would be something like:

moving_end()
{
if(moving)
if rotation old == rotation now
edit detected
}

it's psuedo code :P Just wanting to get opinions, I know it doesn't work 100% of the time, but seems to work the majority. Any one have a different approach?
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
02-13-2009 13:34
Hmm. Might work better with a timer rather instead of or in addition to moving_end. Or maybe even try llGetOmega().

http://www.lslwiki.net/lslwiki/wakka.php?wakka=llGetOmega
Lazink Maeterlinck
Registered User
Join date: 8 Nov 2005
Posts: 332
02-13-2009 14:04
Thanks Hewee, totally forgot about llGetOmega... works like a charm! :)