OpenSim.Region.Framework.Scenes.SceneObjectPart.SetAngularImpulse C# (CSharp) Method

SetAngularImpulse() public method

hook to the physics scene to apply angular impulse This is sent up to the group, which then finds the root prim and applies the force on the root prim of the group
public SetAngularImpulse ( Vector3 impulsei, bool localGlobalTF ) : void
impulsei Vector3 Vector force
localGlobalTF bool true for the local frame, false for the global frame
return void
        public void SetAngularImpulse(Vector3 impulsei, bool localGlobalTF)
        {
            Vector3 impulse = impulsei;

            if (localGlobalTF)
            {
                Quaternion grot = GetWorldRotation();
                Quaternion AXgrot = grot;
                Vector3 AXimpulsei = impulsei;
                Vector3 newimpulse = AXimpulsei * AXgrot;
                impulse = newimpulse;
            }

            if (m_parentGroup != null)
            {
                m_parentGroup.setAngularImpulse(impulse);
            }
        }
SceneObjectPart