Advanced Turret System
  • Welcome
  • Getting Started
    • Quickstart
    • Demo Scene Overview
  • Basics
    • Manual Turret Setup
    • TurretController Inspector
    • Turret Projectiles & Customization
  • Extra
    • Health System
Powered by GitBook
On this page
  • Manual Turret Setup
  • 🔧 Step-by-Step: Manual Turret Creation
  • ✅ Summary Checklist
  1. Basics

Manual Turret Setup

Creating a Turret Manually

Manual Turret Setup

This guide explains how to create a turret from scratch without using the Turret Creator menu. This is useful if you're integrating with your own models or procedural setups.


🔧 Step-by-Step: Manual Turret Creation

1. Create Root GameObject

  • In your scene, create a new empty GameObject. Rename it to something like TurretRoot.

2. Add Core Components

  • Attach the following components to the root object:

    • TurretController

    • TurretSoundManager

    • SphereCollider → set isTrigger = true

⚠️ The SphereCollider defines the turret's detection range. You must set its radius to match the turret's turretRangeRadius.

3. Add a Rotating Head Object

  • Create a child GameObject under the root. This will visually rotate and aim.

  • Example name: TurretHead

  • Assign this GameObject to the Turret Head field in the TurretController component.

4. Add Projectile Spawn Points

  • Under the head, add one or more empty GameObjects to act as spawn points.

  • Suggested names:

    • ProjectileSpawnPoint (single)

    • ProjectileSpawnPoint1, ProjectileSpawnPoint2, etc. (multiple)

  • Assign them to the Projectile Spawn Positions list in the controller.

5. Configure Inspector Options

  • Adjust:

    • Turret Range Radius

    • Fire Rate, Damage, Shoot Mode

    • Projectile Prefab or raycast mode settings

  • You can also enable options like Cone Detection, Obstacle Checks, and Muzzle FX.

6. Add Audio (Optional)

  • On TurretSoundManager, configure:

    • Single Shot Sound or Random Shot Sounds

    • Spatial Blend, Max Distance, etc.

7. Done!

  • Enter Play Mode and tag an enemy object as Enemy.

  • Your turret will detect and engage it with the selected behavior.


✅ Summary Checklist

Want to do this faster? Use the prefab creator under GameObject ▸ Turret to auto-assemble everything.

PreviousDemo Scene OverviewNextTurretController Inspector

Last updated 13 days ago