When attached to an object, the Attack Object and Effect Obj components allow the object to be launched through the attack component towards enemy faction entities.
A Collider component with “Is Trigger” enabled and a Rigidbody component with “Is Gravity” disabled and “Is Kinematic” enabled is also required to be attached to the attack object. This ensures that the attack object can detect collision with enemy faction entities and that its movement is not influenced by gravity.
- Speed: The movement speed of the attack object.
- Follow Target: Can the attack object follow its target if it’s moving?
- Follow Target Distance: Only if Follow Target is enabled, this defines the maximum distance the target object can move from its initial position (when the attack object is activated) before it stops following.
- Movement Type: Either linear or parabolic movement:
- Linear: No additional fields are required to be filled
- Parabolic: When it comes to a parabolic movement, assign the Maximum Height field to the height that the attack object will reach during the movement (it will reach the max height when it’s in the middle between the start and target positions). The Minimum Distance field is the minimum distance required to have between the attack object’s start position and its target position in order to have a parabolic movement, when the distance is less than the specified minimum, the movement will be just linear.
- Damage Once: Can the attack object damage multiple entities or only one?
- Destroy On Damage: Is the attack object destroyed (hidden) when it does damage?
- Child On Damage: When enabled, the attack object will become a child object of the object it damages.
- Obstacle Layer Mask: Define the layers of the objects that represent obstacles for the attack object. Entering in collision with an obstacle object will trigger the same behavior as colliding with a target, expect dealing damage.
- Trigger Effect: This effect object is an the effect that is shown when the attack object is activated/spawned.
- Trigger Effect Face Target: When enabled and there is a trigger effect, rotate it to face the target when created.
- Hit Effect: This effect object is spawned when the attack object deals damage to target or collides with an obstacle.
- Hit Audio: Audio clip played when the attack object deals damage to a target or collides with an obstacle.
The life time of the attack object can be specified in the Effect Object component attached to the attack object’s prefab.