itsTripp / Platformer_Shooter

0 stars 3 forks source link

Turn Off Box Collider On Player Death Animation #34

Open itsTripp opened 2 years ago

itsTripp commented 2 years ago

When the player dies, turn off the box collider. Turn the box collider back on upon restart.

itsTripp commented 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.

AfterMath24 commented 2 years ago

We can hook into whatever system is created for this using the UnityEvent HealthEmpty on the Health component attached to the player.