Skip to content

llStopLookAt

void llStopLookAt()

Stop causing object to point at a target (due to llLookAt() or llRotLookAt()).

This function works in conjunction with llLookAt or llRotLookAt to stop the object from pointing at a target.

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.
}
}