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

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

public llSetVelocity ( 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 llSetVelocity(LSL_Vector force, LSL_Integer local)
        {
            if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return;
            Vector3 velocity = new Vector3((float)force.x, (float)force.y, (float)force.z);
            if (local == 1)
            {
                Quaternion grot = m_host.GetWorldRotation();
                Quaternion AXgrot = grot;
                Vector3 AXimpulsei = velocity;
                Vector3 newimpulse = AXimpulsei * AXgrot;
                velocity = newimpulse;
            }

            if (m_host.ParentEntity.RootChild.PhysActor != null)
                m_host.ParentEntity.RootChild.PhysActor.Velocity = velocity;
        }
LSL_Api