Adding test model as the gun.

This commit is contained in:
Dan Foster
2026-02-11 17:53:20 +00:00
parent 76c9679aa4
commit 9515ed41b5
9 changed files with 858 additions and 21 deletions

View File

@@ -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();
}