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 TurretThis 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
EnemyRotate 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 firingTurretSoundManagerβ Manages 3D audioSphereCollider (isTrigger)β For range detection
You can manually add them via:
π§° Extra: Workflow Customization
Once the turret is in the scene:
Assign a Projectile Prefab (Or leave empty to use raycast mode)
Optional VFX Add a Trail VFX prefab for raycast shots, or a Muzzle Decal for muzzle flashes
Tweak Settings Adjust
Range,Fire Rate,Damage, etc. in the InspectorUse Scene Gizmos Validate:
Spawn points (red spheres)
Firing directions (green rays)
Obstacle checks (yellow rays)
Last updated