OpenSim.Region.ScriptEngine.Shared.Api.LSL_Api.llRotLookAt C# (CSharp) Method

llRotLookAt() public method

public llRotLookAt ( OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion target, double strength, double damping ) : void
target OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion
strength double
damping double
return void
        public void llRotLookAt(LSL_Rotation target, double strength, double damping)
        {
            m_host.AddScriptLPS(1);

            // Per discussion with Melanie, for non-physical objects llLookAt appears to simply
            // set the rotation of the object, copy that behavior
            SceneObjectGroup sog = m_host.ParentGroup;
            if(sog == null || sog.IsDeleted)
                return;

            if (strength == 0 || !sog.UsesPhysics || sog.IsAttachment)
            {
                llSetLocalRot(target);
            }
            else
            {
                sog.RotLookAt(target, (float)strength, (float)damping);
            }
        }
LSL_Api