FPS Foundation Kit

First-person shooter foundation with movement, camera, weapons, projectiles, health, and screen shake.

Setup
1. Import all scripts into your project
2. Create Player with CharacterController component
3. Attach PlayerController3D to the player
4. Add Camera as child, attach FirstPersonCamera
5. Create WeaponData ScriptableObjects for your weapons
6. Attach WeaponSystem to player, assign attack point
7. Create projectile prefab with Projectile and trigger collider
8. Add CameraShake to camera, trigger from weapons

If something does not work
- The mouse does not turn the view: FirstPersonCamera locks the cursor on start and pauses look while the cursor is unlocked; Escape unlocks it. Click inside the Game view to lock it again. Also check that the camera is a child of the player and that the player body is assigned.
- The player cannot jump or falls slowly: PlayerController3D checks the ground with Physics.CheckSphere at its ground check point against Ground Mask. Put the point at the feet and select your floor's layer in Ground Mask.
- Projectiles pass through targets: Projectile reacts in OnTriggerEnter, so its collider must be a trigger and either it or the target needs a Rigidbody. Check that the Hit Layers mask includes the target's layer.
- The Weapon Data menu is missing: Weapon assets are created from Assets > Create > Weapons > Weapon Data. If the menu is missing, a compile error is stopping the scripts from loading; fix the Console errors first.
- Every input call throws InvalidOperationException in a new Unity 6 project: The scripts read the legacy Input class, which new Unity 6 projects switch off. Set Project Settings > Player > Active Input Handling to Both and let the Editor restart. Details and the Input System alternative.

Source: https://scriptsforunity.com/game-systems/fps-foundation-kit/
License: MIT
