llLookAt

From Second Life Wiki
Revision as of 08:21, 7 October 2007 by Ralph Doctorow (talk | contribs)
Jump to navigation Jump to search

Summary

Function: llLookAt( vector target, float strength, float damping );
0.0 Forced Delay
10.0 Energy

Cause object name to point its up axis (positive z) towards target

If the object isn't physical, the settings don't seem to have any effect except the force must be > 0. For physical objects, the strength seems to be something like viscosity, not the rotating strength, so the weaker it is the faster the rotation happens. The damping value controls how fast the rotation damps out. Low values relative to the strength make it bouncy, often overshooting the target, high values sluggish. The strength and damping values seem to have no relation to the mass of the object.

• vector target
• float strength
• float damping seconds to critically damp in

To stop the object from maintaining the target positions use llStopLookAt
To change the position in the same manner use llMoveToTarget.

Caveats

This does not guarantee that physical objects will wind up pointing at the target. Depending on the shape of the object, the strength and the damping, it may well settle out at a different rotation pointing in a different direction if the damping stops the rotation before the final position is reached.

If the object is physical and not symmetrical it may cause a recoil effect where the object winds up drifting away from it's original position as well as making the final rotation it settles on less accurate.

Examples

See Also

Functions

Deep Notes

Signature

function void llLookAt( vector target, float strength, float damping );