Difference between revisions of "PosJump"
m (i missed one !) |
Web Gearbox (talk | contribs) m (LINK_ROOT works faster that llGetLinkNumber call) |
||
Line 6: | Line 6: | ||
// An alternative to the warpPos trick without all the overhead. | // 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. | // Trickery discovered by Uchi Desmoulins and Gonta Maltz. More exact value provided by Fake Fitzgerald. | ||
llSetLinkPrimitiveParamsFast( | llSetLinkPrimitiveParamsFast(LINK_ROOT, [PRIM_POSITION, <1.304382E+19, 1.304382E+19, 0.0>, PRIM_POSITION, target_pos]); | ||
} | } | ||
</lsl> | </lsl> | ||
Line 19: | Line 18: | ||
// Trickery discovered by Uchi Desmoulins and Gonta Maltz. More exact value provided by Fake Fitzgerald. Safe movement modification provided by Alias Turbo. | // 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(); | vector start_pos = llGetPos(); | ||
llSetLinkPrimitiveParamsFast( | llSetLinkPrimitiveParamsFast(LINK_ROOT, [PRIM_POSITION, <1.304382E+19, 1.304382E+19, 0.0>, PRIM_POSITION, target_pos, PRIM_POSITION, start_pos, PRIM_POSITION, target_pos]); | ||
} | } | ||
</lsl> | </lsl> |
Revision as of 09:48, 5 July 2011
Here's an interesting method for bypassing the 10m limitation in Non-Physical movement. Be aware that IT WILL NOT WORK FOREVER, there are plans to fix this bug - for long-term use, rely on warpPos. Alternatives that offer the same functionality are being considered. Until there's an alternative, this bug may be allowed to persist. More information here.
<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. llSetLinkPrimitiveParamsFast(LINK_ROOT, [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();
llSetLinkPrimitiveParamsFast(LINK_ROOT, [PRIM_POSITION, <1.304382E+19, 1.304382E+19, 0.0>, PRIM_POSITION, target_pos, PRIM_POSITION, start_pos, PRIM_POSITION, target_pos]); }
</lsl>