Difference between revisions of "LlLookAt"

From Second Life Wiki
Jump to navigation Jump to search
Line 6: Line 6:
|func_desc=Cause object name to point its '''up''' axis (positive z) towards '''target'''
|func_desc=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 the damping strength, not the rotating strength, so the weaker it is the faster the rotation happens. The tau controls how fast the rotation damps out. Low values relative to the strength make it bouncy, high values more viscous motion.
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, high values more damped. The strength and tau values seem to have no relation to the mass of the object.
 
|return_text
|return_text
|spec
|spec
|caveats=If the object is physical and not symmetrical it may cause a recoil effect.
|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 tau, it may well settle out at a different rotation pointing in a different direction.
 
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.
|constants
|constants
|examples
|examples

Revision as of 20:24, 6 October 2007

Summary

Function: llLookAt( vector target, float strength, float damping );

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, high values more damped. The strength and tau 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 tau, it may well settle out at a different rotation pointing in a different direction.

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.

All Issues ~ Search JIRA for related Bugs

Examples

See Also

Functions

Deep Notes

Search JIRA for related Issues

Signature

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