AMastryukov/LD51

Enemy Gib Manager

Closed this issue · 1 comments

Description
Implementation of enemy hitboxes, ragdoll and gibs

Acceptance Criteria
The part of the enemy that is shot and the corresponding bone disappears and creates giblets and gore at the location
Gibs and ragdolls are automatically deleted if there are too many and after a certain amount of time

Subtasks

  • Hitboxes on each bone
  • Bone scale 0 on hit
  • Shit out related gib
  • Enemy to ragdoll
  • Gib cleanup system
  1. Set up the Enemy Model hierarchy with Gibs and Animated Bones
  2. Group Gibs into relevant hitboxes (Head, Body, Left Leg, Right Leg, Left Arm, Right Arm)
  3. Add box colliders to each bone hitboxes (Head, Body, Left Leg, Right Leg, Left Arm, Right Arm)
  4. Add a script to each hitbox (EnemyHitbox) that fires events every time it is hit by a weapon
  5. Add ragdoll setup to the animated bones
  6. Add a script (EnemyGibManager) that keeps track of giblet groups, joint hinges for ragdolls & handles hit events from the box colliders
    • When a hitbox gets hit & the enemy is dead, gib that part of the body and ragdoll the rest
    • Add API to gib specific parts of the body & gib entire body (for explosions)
    • Keep track of ALL decals, gibs and clean them up after a certain amount of time
  7. Add particle effects for blood explosions when gibs are created
  8. Add decals when the gibs land on the ground and create blood spatter