Open itsTripp opened 2 years ago
The box collider needs to stay active when in death animation to keep the animation/player from sinking through the level. The collision with other objects/enemies needs to be stopped. This should be able to be fixed through the enemy spawn system. When the player dies, the enemies should either despawn or just stop moving until restart where the enemies will be destroyed.
We can hook into whatever system is created for this using the UnityEvent HealthEmpty on the Health component attached to the player.
When the player dies, turn off the box collider. Turn the box collider back on upon restart.