Homing Projectile

As the name suggests, a Homing Projectile seeks its target even if the weapon firing the projectile is not pointed directly at the intended target. Setup is trivial. Simply attach the Combat module’s Homing Projectile component to any potential projectile.

  • Target Mode: This setting determines how the target of the projectile is set.

    • Targeter: The projectile's target comes from the Targeter component attached to the game object specified here.
    • Target: The projectile's target comes directly from the this setting (and does not require a Combat module Targeter component).
  • Ammo Rigidbody: This property will be automatically set if the game object contains a Rigidbody component.

The Propulsion settings control the movement behavior of the projectile...

  • Target Offset: This property offsets the location of the projectile's target... useful in cases where the target's transform root is not visually where the projectile should travel to.
  • Propulsion Delay (seconds): Delays the propulsion of the projectile by a number of seconds. A value of 0 (or less) results in no delay.
  • Propel For (seconds): Stop propelling the projectile after a number of seconds - should be greater than Propulsion Delay.
  • Maximum Turn Angle: The maximum angle, in degrees, that the projectile will turn while homing in on its target.
  • Velocity: How fast the projectile moves toward its target - this should likely match or exceed the max velocity of the projectile ammo if propulsion is delayed. If there is no delay, this setting will effectively override the projectile ammo’s min/max velocity.

Rigidybody Gravity

Turning off gravity on the Rigidbody is optional, but might be desired depending on the specific projectile.

Homing Projectile component