Skip to content
lsl.devlsl.devLSL Dev

llStopMoveToTarget

function
Function syntax
llStopMoveToTarget();
Energy
10

Stops the critically damped movement of the object toward a target (canceling llMoveToTarget). Use llStopLookAt to stop rotational tracking.

Stops critically damped motion

Use in conjunction with llMoveToTarget

To stop rotation movement use llStopLookAt

How to use
llStopMoveToTarget();
Example 1
10 collapsed lines
integer gLockPrimInPlace;
default
{
on_rez(integer sp)
{
llResetScript();
}
state_entry()
{
llStopMoveToTarget();
llSetStatus(STATUS_PHYSICS, TRUE);
}
21 collapsed lines
touch_start(integer total_number)
{
if (llDetectedKey(0) != llGetOwner())
{
return;
}
if (!llGetStatus(STATUS_PHYSICS))
{
llOwnerSay("Locking or unlocking position works only for physical objects.");
return;
}
gLockPrimInPlace = !gLockPrimInPlace;
if (gLockPrimInPlace)
{
llMoveToTarget(llGetPos(), 0.05);
llOwnerSay("Locked in place.");
}
else
{
llStopMoveToTarget();
llOwnerSay("Unlocked.");
}
}
}
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.

From the Second Life Wiki

Community documentation adapted from LlStopMoveToTarget, by Linden Research, Inc. and contributing residents.View contributors and history.

Imported wiki revision:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.