Beispiel #1
0
 protected void CaptureCurrent(Matrix m, CompressedMatrix cm, bool forceUseTransform = false)
 {
     if (forceUseTransform)
     {
         transformCrusher.Capture(transform, cm, m);
     }
     else if (rb)
     {
         transformCrusher.Capture(rb, cm, m);
     }
     /// TODO: Not currently working
     else if (rb2d)
     {
         transformCrusher.Capture(rb2d, cm, m);
     }
     else
     {
         transformCrusher.Capture(transform, cm, m);
     }
 }
Beispiel #2
0
        protected void CaptureCurrent(Matrix m, CompressedMatrix cm, Realm realm = Realm.Primary, bool forceUseTransform = false)
        {
            if (forceUseTransform)
            {
                transformCrusher.Capture(transform, cm, m);
            }
            else if (rb)
            {
                Rigidbody realmRb = realm == Realm.Primary ? rb : null;

                transformCrusher.Capture(realmRb, cm, m);
            }
            /// TODO: Not currently working
            else if (rb2d)
            {
                Rigidbody2D realmRb = realm == Realm.Primary ? rb2d : null;

                transformCrusher.Capture(realmRb, cm, m);
            }
            else
            {
                transformCrusher.Capture(transform, cm, m);
            }
        }