Aurora.ScriptEngine.AuroraDotNetEngine.APIs.LSL_Api.llSetAngularVelocity C# (CSharp) Метод

llSetAngularVelocity() публичный Метод

public llSetAngularVelocity ( Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.Vector3 force, Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLInteger local ) : void
force Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.Vector3
local Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLInteger
Результат void
        public void llSetAngularVelocity(LSL_Vector force, LSL_Integer local)
        {
            if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return;
            Vector3 rotvelocity = new Vector3((float)force.x, (float)force.y, (float)force.z);
            if (local == 1)
            {
                Quaternion grot = m_host.GetWorldRotation();
                Quaternion AXgrot = grot;
                Vector3 AXimpulsei = rotvelocity;
                Vector3 newimpulse = AXimpulsei * AXgrot;
                rotvelocity = newimpulse;
            }

            if (m_host.ParentEntity.RootChild.PhysActor != null)
                m_host.ParentEntity.RootChild.PhysActor.RotationalVelocity = rotvelocity;
        }
LSL_Api