Unity RTS Engine

  1. Home
  2. Unity RTS Engine
  3. Attack Behavior
  4. Attack Component – Weapon

Attack Component – Weapon

Weapon Settings of the attack component.

  1. Weapon Object: Assign the attacker’s weapon transform to this field in case the weapon object can be rotated to face the target. When not assigned, the rest of the fields will be hidden.
  2. Rotate In Attack Range Only: When disabled, the weapon object will start rotating as soon as a target is locked. When enabled, the weapon will only start rotating when the faction entity enters in the attacking range.
  3. Smooth Rotation: When enabled then the weapon object will rotate smoothly to face its target. If not, the weapon object’s rotation will be instantly set to face the target.
  4. Rotation Damping: If smooth rotation is enabled, this value determines how smooth the rotation is. The higher the value is, the faster the rotation is.
  5. Freeze Rotation X/Y/Z: These three fields allow the weapon object’s rotation to be fixed (unchanged) on one or more of the axis.
  6. Force Idle Rotation: When enabled and when the attacker does not have a current target then the weapon’s object will be rotated back to an idle rotation.
  7. Idle Angles: The angles of the weapon object’s idle rotation.

How can we help?