PosJump

From Second Life Wiki
Revision as of 11:31, 24 December 2008 by Soft Linden (talk | contribs)
Jump to navigation Jump to search

Here's an interesting method for bypassing the 10m limitation in Non-Physical movement in 1.25 and earlier simulators. It has been fixed in 1.26. This page is for curiosity only - for long-term use, rely on warpPos.

<lsl> posJump(vector target_pos) { // An alternative to the warpPos trick without all the overhead. // Trickery discovered by Uchi Desmoulins and Gonta Maltz. More exact value provided by Fake Fitzgerald. llSetPrimitiveParams([PRIM_POSITION, <1.304382E+19, 1.304382E+19, 0.0>, PRIM_POSITION, target_pos]); } </lsl>


If the target position turns out to be no-entry, your object will go offworld. So Alias Turbo included a step that sends the object back to its starting position (just in case!) before trying the target position again. So in the case that the target position is no-entry, it will either move 10m at most, or not at all. <lsl> safe_posJump(vector target_pos) { // An alternative to the warpPos trick without all the overhead. // Trickery discovered by Uchi Desmoulins and Gonta Maltz. More exact value provided by Fake Fitzgerald. Safe movement modification provided by Alias Turbo.

     vector start_pos = llGetPos();

llSetPrimitiveParams([PRIM_POSITION, <1.304382E+19, 1.304382E+19, 0.0>, PRIM_POSITION, target_pos, PRIM_POSITION, start_pos, PRIM_POSITION, target_pos]); } </lsl>