mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +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.
|
// move all physics components from one GameObject to another.
|
||||||
public static void MovePhysicsComponents(GameObject source, GameObject destination)
|
public static void MovePhysicsComponents(GameObject source, GameObject destination)
|
||||||
{
|
{
|
||||||
MoveRigidbody(source, destination);
|
// need to move joints first, otherwise we might see:
|
||||||
MoveAllColliders(source, destination);
|
// 'can't move Rigidbody because a Joint depends on it'
|
||||||
MoveAllJoints(source, destination);
|
MoveAllJoints(source, destination);
|
||||||
|
MoveAllColliders(source, destination);
|
||||||
|
MoveRigidbody(source, destination);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user