Hitbox Boss

Scene: DuckShooter_HitboxBoss

A more complex health setup: one boss duck whose single Health is fed by many hitboxes, each affecting it differently.

  flowchart LR
    W["Weak sphere x2"] --> H((Boss Health))
    N["Normal sphere x1"] --> H
    A["Armored sphere x0.5"] --> H

Where you hit decides how fast the boss goes down: a weak sphere takes four times the damage of an armored one.

🦆 The Boss: DS_BossDuck Variant

The boss is a prefab variant of DS_Duck, so it keeps the duck’s setup and adds to it:

PartSetup
Health5000 on the root
Health barOn Health Changed sets a UI slider’s value
8 spheresEach has a Hitbox with a multiplier of 2, 1 or 0.5

Every sphere’s hitbox finds the same Health on the boss’s root, so they all damage one health pool.

⚪ The Spheres

Each sphere has two colliders, so it can both take and deal damage:

  • A solid collider with a Hitbox: your bullets hurt the boss.
  • A trigger collider with Contact Damage (100): flying into it hurts your ship.

Tip

Use the same setup for headshots on characters: one Health on the root and a hitbox per body part with its own multiplier.