Setting Hitbox Off After Getting Hit

Instead of working with the collisions (turning them on or off) add an IsInvulnerable bool and once you are hit set it to true. Start a timer that once it ends turn off IsInvulnerable.

Add a check for IsInvulnerable before administering damage. If the character is in it’s invulnerable state then do not do the damage if not then apply the damage as needed. (triggering the state and restarting the timer)

1 Like