Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llDetectedPos() across a sim border

Jamie Marlin
Ought to be working....
Join date: 13 May 2005
Posts: 43
06-28-2005 09:30
Hi all!

Anybody know the whole story on how this function works across sim borders? I am working on a pet script which uses llDetectedPos() in a sensor event and llMoveTo() to move a physical pet. In follow mode, I loose the pet as soon as I cross a sim border - and pick it up again as soon as I return. Ok... makes sense. Maybe llDetectedPos() doesn't work across the border. But... I have seen several example scanner scripts where it DOES work - or at least llVecDist() returns the proper distance. To add to my confusion, when I put the pet in orbit mode and stand near the border, it can circle into the next sim and then back out successfully.

What is going on? Any ideas?
Jon Marlin
Builder, Coder, RL & SL
Join date: 10 Mar 2005
Posts: 297
06-28-2005 09:43
You can give slightly out-of-bounds values when you move a non-physical object using llSetPos, which will put the object into the adjacent sim. If the sim border is at 0, you can set the value to -5 and the object will move 5 meters into that sim.

I suspect llDetectedPos has the same type of behavior. The teleport home script call has the same problem as far as I know -- if you own land on a sim border, it can teleport someone home who is in the next sim if they are close to the border (I've actually had this happen to me).

- Jon
_____________________
Come visit Marlin Engineering at Horseshoe (222, 26) to see my line of flying vehicles.
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
06-28-2005 09:54
llSensor does not seem to work across a sim border. However, llSensorRepeat *does*, on the third or fourth iteration.
_____________________
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
06-28-2005 09:56
Sensors I beleive have a 10 meter buffer into adjacent sims.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
06-28-2005 10:42
Sensors are very finiky about working across sim borders. Sometimes they do, sometimes they dont. I wouldn't rely on them for a flying pet.

Instead, I would wear an attachment that chats my position (llGetPos() *and* llGetRegionCorner()) and my rotation. Then, the pet can listen for the data, parse it, and move to the offset it needs to move to. Chat crosses sim borders quite reliably.

See the wiki page on global coordinates to get an idea of why I said use both llGetPos and llGetRegionCorner.
==Chris
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm