mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Prediction: collider materials are now copied too
This commit is contained in:
parent
42dffbe898
commit
9f8c801795
@ -73,6 +73,7 @@ public static void MoveBoxColliders(GameObject source, GameObject destination)
|
||||
colliderCopy.center = sourceCollider.center;
|
||||
colliderCopy.size = sourceCollider.size;
|
||||
colliderCopy.isTrigger = sourceCollider.isTrigger;
|
||||
colliderCopy.material = sourceCollider.material;
|
||||
GameObject.Destroy(sourceCollider);
|
||||
}
|
||||
}
|
||||
@ -92,6 +93,7 @@ public static void MoveSphereColliders(GameObject source, GameObject destination
|
||||
colliderCopy.center = sourceCollider.center;
|
||||
colliderCopy.radius = sourceCollider.radius;
|
||||
colliderCopy.isTrigger = sourceCollider.isTrigger;
|
||||
colliderCopy.material = sourceCollider.material;
|
||||
GameObject.Destroy(sourceCollider);
|
||||
}
|
||||
}
|
||||
@ -113,6 +115,7 @@ public static void MoveCapsuleColliders(GameObject source, GameObject destinatio
|
||||
colliderCopy.height = sourceCollider.height;
|
||||
colliderCopy.direction = sourceCollider.direction;
|
||||
colliderCopy.isTrigger = sourceCollider.isTrigger;
|
||||
colliderCopy.material = sourceCollider.material;
|
||||
GameObject.Destroy(sourceCollider);
|
||||
}
|
||||
}
|
||||
@ -132,6 +135,7 @@ public static void MoveMeshColliders(GameObject source, GameObject destination)
|
||||
colliderCopy.sharedMesh = sourceCollider.sharedMesh;
|
||||
colliderCopy.convex = sourceCollider.convex;
|
||||
colliderCopy.isTrigger = sourceCollider.isTrigger;
|
||||
colliderCopy.material = sourceCollider.material;
|
||||
GameObject.Destroy(sourceCollider);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user