-
Notifications
You must be signed in to change notification settings - Fork 0
AntiAirHUD
vehicleObject - The vehicle GameObject that has this HUD system
targetObject - UI transform for the aiming reticle/crosshair
infoObject - UI transform containing target information panel
lineImage - UI RectTransform for connection line (currently unused)
canvas - The canvas GameObject containing the UI elements
calibrationSpeed (string/number) - Projectile velocity in m/s (e.g., "800" for 800 m/s)
calibrationGravity (string/number) - Gravity multiplier (e.g., "1" for standard gravity, "0" for no drop)
The infoObject must contain child objects:
"Name" - Text component to display target vehicle name
"Distance" - Text component to display distance to target
"Velocity" - Text component to display target speed
Parameter Type Purpose
calibrationSpeed Number Sets the muzzle velocity of your weapon's projectiles. Higher = faster projectiles = less lead needed
calibrationGravity Number Gravity multiplier for projectile drop. 0 = no drop (lasers), 1 = normal gravity, >1 = more drop
vehicleObject GameObject The vehicle using this HUD (needed to get Vehicle component and position)
targetObject Transform UI element that shows where to aim (lead indicator)
infoObject Transform UI panel showing target name, distance, and velocity
canvas GameObject Parent canvas (currently stored but not used)
Target velocity
Projectile speed
Gravity drop
Distance to target
Lead indicator (where to shoot)
Target name
Distance in meters
Target velocity in m/s
Auto-Update - Tracks locked target position and updates lead indicator in real-time
Team Filtering - Only locks onto enemy vehicles (different team than player)
Automatically updates vehicle list when vehicles spawn/die
Hides UI when not locked or player exits vehicle
Scales reticle size based on distance (smaller at range)
Checks line-of-sight before locking