intermediate

FPS Foundation Kit

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

6 scripts · 22 KB
FPSHorror Great for FPS prototyping

Features

3D character controller with sprint, jump, and slope handling
First person mouse look with sensitivity and vertical clamp
ScriptableObject weapon system (melee and ranged)
Pooled projectiles with damage, homing, and impact VFX
Health system with invincibility and event callbacks
Perlin noise camera shake for impacts and weapon fire

Included Scripts

/fps-foundation-kit/

Setup Guide

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

Code Preview

C#
// WeaponData.cs - ScriptableObject weapon definition
[CreateAssetMenu(menuName = "Weapons/Weapon Data")]
public class WeaponData : ScriptableObject
{
    public string weaponName;
    public bool isMelee;
    public float damage = 10f;
    public float attackRate = 1f;
    public GameObject projectilePrefab;
}

// WeaponSystem.cs - Attack controller
public class WeaponSystem : MonoBehaviour
{
    [SerializeField] private WeaponData currentWeapon;
    public void Attack() { /* melee or ranged */ }
    public void EquipWeapon(WeaponData weapon) { /* swap */ }
}

Available Individually

These scripts are also available as standalone downloads:

Related Systems