Hi,
To setup:
I have two instances of the same prefab. Each prefab has two unique trigger objects that have the same script attached to them.
prefab1
- trigger1
– scriptA - trigger2
– scriptA
prefab2
- trigger1
– scriptA - trigger2
– scriptA
The general idea is that when prefab1/trigger1 collides (receives OnTriggerEnter event) with prefab2/trigger2 a message will be sent from prefab1/trigger1 to prefab2/trigger2, telling it to set a variable, but if and only if prefab2/trigger2 has received an OnTriggerEnter event also (confirming that it had been hit, too).
I’m generally able to get this working well enough, except when I start adding additional prefabs some prefab2/trigger2 objects don’t receive an OnTriggerEvent, and I can’t figure out why one particular prefab2/trigger2 would get such an event, and why another wouldn’t.
(Does the above make sense? If not, please let me know and I’ll try and be more clear…)
So the question is:
Why would some triggers not receive a OnTriggerEnter event, even though others of the same exact kind do?
These are generally “slow speed” collisions, so it’s not a case of one object going too quickly for the collider to detect it. I’ve also tried OnTriggerStay, but get the same result.
Thanks!