llRotLookAt(rotation target, float strength, float damping);
Rotates the
object that contains the script (aligns forward/x-
axis to
camera) to
target over
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 would 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.
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.
This article wasn't helpful for you? Maybe the
related article at the LSL Portal is able to bring enlightenment.
Functions |
Dynamics |
Rotation