Skip to content

Commit ae87bf6

Browse files
committed
Fix errors for ball copies to fracture
1 parent cb7cbea commit ae87bf6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Assets/Project/Scripts/Custom/Utils.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using Mirror;
12
using UnityEngine;
23

34
public static class Utils
@@ -38,6 +39,8 @@ public static void CauseFracture(this Component self, float fragmentScale = 1f,
3839
self = !copy ? self : Object.Instantiate(
3940
self, transform.position, transform.rotation);
4041

42+
if (copy) self.GetComponent<PredictedRigidbody>().enabled = false;
43+
4144
self.tag = "Break";
4245
self.transform.localScale *= fragmentScale;
4346

0 commit comments

Comments
 (0)