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):

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:


🧰 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)

Last updated