KAS.KASModulePhysicChild.WaitAndPromoteToPhysic C# (CSharp) 메소드

WaitAndPromoteToPhysic() 개인적인 메소드

Turns rigidbody to a physics object.
The update is delayed till the next fixed update to let game's physics to work. Once updated the physical object is guaranteed to be detached from the parent.
private WaitAndPromoteToPhysic ( ) : IEnumerator
리턴 IEnumerator
        IEnumerator WaitAndPromoteToPhysic()
        {
            yield return new WaitForFixedUpdate();
            Debug.LogFormat("Delayed set velocity to: {0} | angular velocity: {1}",
                    part.Rigidbody.velocity, part.Rigidbody.angularVelocity);
            physicObjRb.angularVelocity = part.Rigidbody.angularVelocity;
            physicObjRb.velocity = part.Rigidbody.velocity;
            physicObjRb.isKinematic = false;
            physicObj.transform.parent = null;
        }