Difference between revisions of "LlStopLookAt"

From Second Life Wiki
Jump to navigation Jump to search
 
m (Replaced old <LSL> block with <source lang="lsl2">)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{LSLFunctionAll|func_id=106|func_sleep=0.0|func_energy=10.0|func=llStopLookAt|func_footnote=Stop causing object name to point at a target|return_text|spec|caveats|examples|helpers|related|also|notes}}[[Category:LSL_Functions]][[Category:LSL_Stub]]
{{LSL_Function
|func_id=106|func_sleep=0.0|func_energy=10.0
|func=llStopLookAt
|func_footnote=Use in conjunction {{LSLG|llLookAt}} or {{LSLG|llRotLookAt}}.
|func_desc=Stop causing object to point at a target
|return_text
|spec
|caveats
|constants
|examples=<source lang="lsl2">
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.
    }
}
</source>
|helpers
|also_functions=*{{LSLG|llLookAt}}
*{{LSLG|llRotLookAt}}
|also_tests
|also_events
|also_articles
|notes
|cat1=Target
|cat2=Physics
|cat3=Movement
|cat4
}}

Latest revision as of 12:42, 22 January 2015

Summary

Function: llStopLookAt( );

Stop causing object to point at a target

Use in conjunction llLookAt or llRotLookAt.

Examples

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

See Also

Functions

Deep Notes

Search JIRA for related Issues

Signature

function void llStopLookAt();