Setting a collider to active does not trigger collisions with nearby objects
I'm trying to make a bomb explode, for that I created a disabled collider while the bomb travels, and when it's time to blow up, I make the collider active. However, for some reason OnTriggerEnter is not called at all for the objects that are in the collider area when it becomes active.
I did some simple tests like enabling/disabling the collider on the editor on runtime, and it does trigger it, which makes me believe there is some sort of update shenanigans going on.
How can I circumvent this?
Answer by Artych · Jun 16, 2019 at 11:59 PM
The bomb was set to explode when it stopped moving. Apparently, colliders aren't checked when the object is not moving. To solve this I just changed its position by a miniscule amount.
Your answer
Follow this Question
Related Questions
How to make a growing mesh 0 Answers
Trigger not detected 0 Answers
Infinite Collision? Can't figure out bug 0 Answers
How to detect collision of two moving characters? 1 Answer
How to move and rotate to other direction when hitting a wall 1 Answer