OnTriggerEnter only fires the first time, not with a respawn. WHY?

This is very strange. I’ve been racking my brain trying to figure this out for 3 hours.
I have people in my game that have no rigidbody, only a sphere collider with a trigger. When they fall and hit the ground plane I despawn them in the OnTriggerEnter method in my script.

After I respawn them, they pass right through the ground plane without triggering. The collider is still there, it’s still a trigger, and the ground plane has not changed. How is this possible?

Any ideas?

Ok, I narrowed this down. Basically sometimes the trigger just will not fire for a non-rigidbody collider hitting a rigidbody collider. Seems to be a Unity bug. I’ve removed all my other plugins and it still happens.

what about if you debug a line with Debug.Log, to see if effectively the trigger is working…

Yes, I did that several times. The trigger works until I kill 1 vehicle, then the trigger no longer works at all. But the ground plane and the trigger collider object have not changed at all according to the inspector.

Infuriating.

are you sure that the listener is still there? Are you sure it’s the same object you are looking at? My first step would be to add a breakpoint on first line of the collision function and see what comes through.

Yes I’m sure. I slowed down the fake coded gravity I have so it very slowly descends from 10 meters above the ground. It takes like 2 seconds after it touches the ground to fully pass through, and at no point does the OnTriggerEnter method fire (if I have already destroyed one enemy).

It’s beyond strange.

Does it consistently trigger for first and not for subsequent? Are these re-spawned in the same place with some attributes? How exactly do you despawn your objects?

“Basically sometimes the trigger just will not fire for a non-rigidbody collider hitting a rigidbody collider”

It’s unlikely this is the case this is a rudimentary behaviour likely used by hundreds if not thousands of projects. Using it in a current project with no issues. Seen several similar posts, every time it has been user error.

EDIT: Removed stuff about size and speed given that you mentioned things were large and slow.

I have given up on this approach anyway, and switched to CharacterControllers. We spent about 10 hours on it, and no luck. Even taking the spawn / respawn component out of the picture, it still fails just the same. Reliably.

And yes, it works totally before I destroy any one vehicle. I can watch dozens of guys fall to the floor and collide. Then I destroy one vehicle, and no people (even existing at that time) will collide with the ground anymore. As if the ground plane had “is trigger” turned on, but it did not. I can see in the inspector. Actually vehicles, which had gravity rigidbodies do not fall through the ground, so that’s not it…As I just posted, even when I move the objects super super slow (takes 5 - 10 seconds for them to reach the groundplane), they do not trigger. The objects are 5 meters high with a sphere collider.

Well I must admit I am curious, but if you have worked around it I should probably get back to doing my own stuff.

Thanks Johnny, and good luck on your stuff.