Adding test model as the gun.
This commit is contained in:
@@ -60,9 +60,7 @@ public class SimpleGun : MonoBehaviour
|
||||
playerController = GetComponentInParent<CharacterController>();
|
||||
originalLocalPos = transform.localPosition;
|
||||
|
||||
// Strip colliders from all children so they don't block the CharacterController
|
||||
StripChildColliders();
|
||||
|
||||
|
||||
// NUCLEAR OPTION: Remove ANY collider on this object or children
|
||||
Collider[] allColliders = GetComponentsInChildren<Collider>();
|
||||
foreach (Collider col in allColliders)
|
||||
@@ -74,10 +72,8 @@ public class SimpleGun : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Only create a procedural gun if there's no existing model geometry
|
||||
if (GetComponentsInChildren<MeshRenderer>().Length == 0)
|
||||
CreateSimpleGunModel();
|
||||
|
||||
// Strip colliders from all children so they don't block the CharacterController
|
||||
StripChildColliders();
|
||||
CreateMuzzleFlash();
|
||||
InitDecalPool();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user