Skip to content
lsl.devlsl.devLSL Dev

llStopLookAt

function
Function syntax
llStopLookAt();
Energy
10

Stops causing the object to look at or point toward a target (canceling llLookAt or llRotLookAt).

Stop causing object to point at a target

Use in conjunction llLookAt or llRotLookAt.

How to use
llStopLookAt();
Example 1
14 collapsed lines
default
{
state_entry()
{
llSensorRepeat("", "", AGENT, 20.0, PI, 0.2);
//Detects avatars
}
sensor(integer total_number)
{
llLookAt( llDetectedPos(0) + <0.0, 0.0, 1.0>, 3.0, 1.0 );
//Looks at the nearest avatar.
}
touch_start(integer total_number)
{
llStopLookAt();
llSensorRemove();
//Stops looking at any avatar and removes the sensor.
}
}
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 LlStopLookAt, 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.