OnTriggerEnter - When player is in zone for 3 seconds, take damage Help
Sorry, I technically posted this a minute ago but due to a radical change in my script, I decided to entirely repost it:
I tested the player damage in the ontriggerenter and it works. The ontriggerexit also works.
why is the countdown not working?
5 Replies
onTrigger only happens once
there 2 solution for this
start timer using bool executed on update, turn it on/off on enter/exit
OR
use onTriggerStay
oh shit
you are right
it happens each enter
that was a really obvious mistake
thanks for pointing that out
btw u may want to use Overlap instead on Fixedupdate
its not dependent on unity frame