Aurora.ScriptEngine.AuroraDotNetEngine.APIs.LSL_Api.llLinkSitTarget C# (CSharp) Method

llLinkSitTarget() public method

public llLinkSitTarget ( Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLInteger link, Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.Vector3 offset, Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.Quaternion rot ) : void
link Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLInteger
offset Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.Vector3
rot Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.Quaternion
return void
        public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot)
        {
            if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return;

            // LSL quaternions can normalize to 0, normal Quaternions can't.
            if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0)
                rot.z = 1; // ZERO_ROTATION = 0,0,0,1

            List<ISceneChildEntity> entities = GetLinkParts(link);
            if (entities.Count == 0)
                return;

            entities[0].SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z);
            entities[0].SitTargetOrientation = Rot2Quaternion(rot);
        }
LSL_Api