My game’s player object explodes on collisions with enemies (objects tagged enemy). It sends a message to an object which decrements lives and then instantiates the player prefab. This new player instance is supposed to have an invulnerability period during which the collider turns off, so that it doesn’t hit anything until the period is up. The thing is, the new instances are colliding anyway. I’ve paused midgame to see that the collider is in fact, disabled. not just set to isTrigger, it’s disabled totally. I’ve even tried destroying the collider, to no avail. The object is still colliding. It has 3 children, one of which has a collider that is also disabled (always), and two objects without colliders altogether.
If I set the player object that is in the scene to begin with to have that invulnerability period (that is, check a bool newLife to true), it will not collide. it works as intended. It is only new instances that will do this. I’m really unable to figure out why these objects are colliding without colliders.
To be completely clear, during this invulnerability period, the collider is disabled. The box next to it is unchecked. Nothing I do in game, until that period ends, will turn it back on. The object acts as though the collider is enabled anyway, and only new instances do this. The object that exists within the scene on startup works properly.
Any help would be amazing. Thanks.