Skip to content

Commit

Permalink
fix(PredictionUtils): move freeze rotation before constraints (#3946)
Browse files Browse the repository at this point in the history
* fix: move freeze rotation before constraints

* Update PredictionUtils.cs

---------

Co-authored-by: mischa <[email protected]>
  • Loading branch information
adriano-t and miwarnec authored Nov 21, 2024
1 parent 4a02ab5 commit e493812
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ public static void MoveRigidbody(GameObject source, GameObject destination, bool
rigidbodyCopy.isKinematic = original.isKinematic;
rigidbodyCopy.interpolation = original.interpolation;
rigidbodyCopy.collisionDetectionMode = original.collisionDetectionMode;
// fix: need to set freezeRotation before constraints:
// https://github.com/MirrorNetworking/Mirror/pull/3946
rigidbodyCopy.freezeRotation = original.freezeRotation;
rigidbodyCopy.constraints = original.constraints;
rigidbodyCopy.sleepThreshold = original.sleepThreshold;
rigidbodyCopy.freezeRotation = original.freezeRotation;

// moving (Configurable)Joints messes up their range of motion unless
// we reset to initial position first (we do this in PredictedRigibody.cs).
Expand Down

0 comments on commit e493812

Please sign in to comment.