2014-11-12

Why you might not want to use llTargetOmega

Earlier today, while out browsing at an event (which'll likely get more of a mention in a later blog post), I picked up what looked like a fun little gadget. It's billed as a Mad-O-Meter and looked like the perfect sort of silly prop you need to have in your inventory. I was even thinking that it could be something nicely silly to put out in the Raven Park Abbey.

Me and my stunt double observing the device
in its initial state
Only... it doesn't really work. Well, that's not fair. It works in that when you touch the button to make it work it does its thing and picks your madness level by spinning the pointer. Where it goes wrong is what happens next.

I first tried it when Mistress and I got home from the event and right away there was some disagreement over what it was saying. We'd spin it and I'd see the pointer land on one thing and she'd see it land on another. Now, perhaps, this was intentional, although I'd hope that if it was it would be made clear (there was no notecard to say either way). For a moment though I'm going to assume that the creator intended it to work as we expected: the madness level would be seen by everyone so that everyone could all have a laugh at the same thing.

Logged in later, with my stunt double logged in on a different machine, and both looking at the device, I started with it in its initially-rezzed state (see above). I then touched it and both avatars watched it spin. Here was the result:

How I saw the pointer after giving it a spin
How my stunt-double saw the pointer after
the same spin
Obviously I can't peek at the code (it's understandably no-mod) but I'm going to make a wild guess and assume that the code is using llTargetOmega to do the spin. The problem with that is that, unless the object is physical, the spin effect is client-side only. That is, in-world, there's no spin. The spin effect is created in and only visible in your viewer. This means that it's highly likely that everyone will see the spin position differently.

This device is a good example of this happening, and why you might not want to use llTargetOmega if you want a spin on an object that should look the same to everyone.

Still, in this case, it's likely to drive everyone observing it batty as they argue over the latest result so even if it's an unintended side-effect (AKA bug) it's one that works. ;)

3 comments:

  1. At the time of reading this, I was updating the scripts documentation site, with the corresponding on to the music box script, which among other features, spins objects such as winding keys. I was holding my breath while this post was loading, "no, no, no, please don't tell me there's a new bug and now I have to redo all the scripts and pages".

    Fortunately, the story ends well. I do wonder too if the effect is intentional. The client side effect of llTargetOmega sure makes for the madness! (If you ever know, will you tell?)

    ReplyDelete
    Replies
    1. Oops. Sorry, didn't mean to create panic.

      Or did I? *manic laughter*

      Delete