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
  • 🚀 Quickstart Guide
  • ✅ Step 1 – Install the Package
  • 🛠️ Step 2 – Create a Turret
  • ▶️ Step 3 – Test It in Action
  • 🧱 Required Components
  • 🧰 Extra: Workflow Customization
  1. Getting Started

Quickstart

🚀 Quickstart Guide

Setting up a working turret is fast and code-free. Follow these steps to get your turret up and firing in under a minute.


✅ Step 1 – Install the Package

Drag and drop the Advanced Turret AI System into your Unity project. The folder structure includes:

AdvancedTurretAISystem/
├── Scripts/
├── Editor/
├── Prefabs/
├── Scenes/
├── Models/

Everything is self-contained. No dependencies required.


🛠️ Step 2 – Create a Turret

Create a turret from the top menu:

GameObject ▸ Turret ▸ Create Single Barrel Turret
GameObject ▸ Turret ▸ Create Double Barrel Turret

This will drop a fully functional prefab into your scene with:

  • TurretController and TurretSoundManager added

  • Detection collider and spawn points configured

  • Rotation, shooting, and audio ready to go


▶️ Step 3 – Test It in Action

Press Play. The turret will automatically:

  • Search for GameObjects tagged Enemy

  • Rotate and aim predictively

  • Fire based on range and alignment

To demo moving targets, add the included LinearPingPongMover to any GameObject (like a capsule):

// Moves the object back and forth
Add Component ▸ LinearPingPongMover

This creates simple motion ideal for tracking tests.


🧱 Required Components

All turrets need the following components (auto-added when using the menu):

  • TurretController – Handles logic and firing

  • TurretSoundManager – Manages 3D audio

  • SphereCollider (isTrigger) – For range detection

You can manually add them via:

Component ▸ Advanced Turret AI

🧰 Extra: Workflow Customization

Once the turret is in the scene:

  1. Assign a Projectile Prefab (Or leave empty to use raycast mode)

  2. Optional VFX Add a Trail VFX prefab for raycast shots, or a Muzzle Decal for muzzle flashes

  3. Tweak Settings Adjust Range, Fire Rate, Damage, etc. in the Inspector

  4. Use Scene Gizmos Validate:

    • Spawn points (red spheres)

    • Firing directions (green rays)

    • Obstacle checks (yellow rays)

PreviousWelcomeNextDemo Scene Overview

Last updated 14 days ago