Answer by alok.kr.029
I think so every time the trigger is entered the hitCoolDown = true and meanwhile in update every frame it gets updated and try running your if(hitCoolDown){ hitTimer += Time.deltaTime; if(hitTimer...
View ArticleAnswer by ThomasMarsh
I managed to fix my own issue by modifying the code inside the OnTriggerEnter so that the object that collides with the trigger is checked first, and then the cooldown and meshrenderer are checked in...
View ArticleAnswer by alok-kr-029
I think so every time the trigger is entered the hitCoolDown = true and meanwhile in update every frame it gets updated and try running your if(hitCoolDown){ hitTimer += Time.deltaTime; if(hitTimer...
View ArticleAnswer by ThomasMarsh
I managed to fix my own issue by modifying the code inside the OnTriggerEnter so that the object that collides with the trigger is checked first, and then the cooldown and meshrenderer are checked in...
View Article