LSL Wiki Mirror : llRotLookAt

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings ::
llRotLookAt(rotation target, float strength, float damping);

Rotates the object that contains the script (aligns forward/x-axis to camera) to target over damp damping seconds.

This function works for both physical and non-physical objects. For non-physical objects, good strength values are around half the mass of the object and good damping values are less than 1/10th of the strength. For physical objects, this function behaves more like llMoveToTarget, where increasing the strength or tau seems to slow the rotation. Good values for physical objects range between .2 and 1 for both parameters. Asymmetrical shapes require smaller damping.

Q: Are those recommendations for non-physical objects valid? Or is it that any values in there work when it's essentially weightless?
A: Obviously any value word work for a non-physical object because there's no friction or gravity to worry about. It's whether or not it looks good that you have to think about when choosing the values.

Q: Does llSetLocalRot work on attachments?
A: As of 1.8, No.

Calling llStopLookAt stops the effects of this function.
Failure to stop may render a prim unlinkable until llStopLookAt is called (even if the script is removed).

Note: within the LSL editor, the tooltip for llRotLookAt reads "llRotLookAt(rotation target, F32 strength, F32 damping)". F32 refers to a 32-bit float. In LSL, all floats are 32-bit.

Compare with llLookAt.


Functions | Dynamics | Rotation
There are 18 comments on this page. [Display comments/form]