Hi all-- This is a bit of an odd one. I’ve spent a few days trying to figure it out. The game is 2D but it’s still using the 3d physics engine. My character can shoot a gun. So let’s take a sliding door as an example of this trigger problem–it affects all triggers. When the player enters the trigger–the door opens. When the player leaves the trigger, the door closes. Simple and to the point. The issue–whenever the player fires the gun–the onTriggerEnter, and onTriggerExit IMMEDIATELY activate back to back and the door will open and close while the player is still within the trigger space–never having left it.
The only thing I can decipher–is Instantiating something (a bullet) from the player controls script causes the controller’s collider to reset? The triggers are activated by a SendMessage(ActivateTrigger) --ActivateTrigger being my custom script the trigger objects–like doors–share. Only the player script has functions that SendMessage with Activate Trigger – so the problem has to be with the player.
Things I know: The same effect occurs when I resize the characterController’s capsule collider in the editor window – shooting a bullet doesn’t resize the characterController.