EasyTurret is a premier turret asset that will aim at a target using a 2-axis turret system. It can aim directly or hit moving targets using linear intercept or ballistic arcs.
For more detail this asset from the Unity Asset Store: Click Here
This is a paid asset, but now you can download the “Easy Turret AI Script” for FREE. Please keep in mind that this package is provided only for learning purposes or to test before buying the product, NOT FOR COMMERCIAL PURPOSES.
Easy Turret AI Script v1.1.2
“If possible, please buy the package to support the developer”
Description
Major Update!
EasyTurret now features a smooth motion option, for realistic ease-in/ease-out motion of the rotator and elevator parts.
Features:
Streamlined design for maximum compatibility with existing frameworks, weapons, and art.
Custom editor that includes visual arc references in the scene view. Supports multi-object editing.
Two-axis system: separate rotator and elevator objects.
Constant or smooth motion turning types.
Multiple aim modes
Direct mode aims directly at target – good for laser beams.
Intercept mode to hit moving targets using linear intercept calculation.
Ballistic mode to aim a projectile affected by gravity.
Ballistic + Intercept aim to use a projectile affected by gravity to hit a moving target.
Ballistics can use high arc or low arc solutions. Works with varying gravity strengths and directions.
Universal placement
Tracking is independent of turret orientation, motion, or parenting.
Place turrets on any stationary or moving objects, at any angle – even turrets within turrets within turrets!
Additional Features:
Base, rotator, elevator, and gun mounts do not have to be positionally aligned, allowing for creative and unusual turret styles.
Separate turn and elevation rates.
Rotation and elevation arc limits.
Arbitrary at rest position.
Audio support for movement sounds that change pitch and volume based on rotation speed.
Built-in functions to ask if the turret is aimed at the target, if a target is within arc limits, and more.
Technical details
Turrets can be referenced by other scripts with methods, or the turrets can send events to specific scripts implementing an interface.