mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-17 18:40:33 +00:00
move joints before rigidbodies
This commit is contained in:
parent
5fab4c7978
commit
7b4a094f5c
@ -368,9 +368,11 @@ public static void MoveAllJoints(GameObject source, GameObject destination)
|
||||
// move all physics components from one GameObject to another.
|
||||
public static void MovePhysicsComponents(GameObject source, GameObject destination)
|
||||
{
|
||||
MoveRigidbody(source, destination);
|
||||
MoveAllColliders(source, destination);
|
||||
// need to move joints first, otherwise we might see:
|
||||
// 'can't move Rigidbody because a Joint depends on it'
|
||||
MoveAllJoints(source, destination);
|
||||
MoveAllColliders(source, destination);
|
||||
MoveRigidbody(source, destination);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user