public ApplyAngularImpulse ( System.Vector3 impulsei, bool localGlobalTF ) : void | ||
impulsei | System.Vector3 | Vector force |
localGlobalTF | bool | true for the local frame, false for the global frame |
리턴 | void |
public void ApplyAngularImpulse(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.applyAngularImpulse(impulse);
}
}