Here’s my situation: I have a trigger that acts as “dark area” so that every sprite that enters it has its color light (V value - HSV) changed to give the player the feeling of entering a shadow zone. The trigger has a generic script that I use a lot throughout the game, and it affects every sprite inside the trigger.
I use the OnTriggerStay() method because I want to smooth the sprites’ color change depending on their Xpos (darker the closer they are to the centre of the trigger, and lighter the farther they are from it). Due to perspective issues, I want the main character to not send the OnTrigger Enter, Stay and Exit events just for one specific trigger, and I can’t disable it since there is another character in it who does need to be endarked at te same time. I’ve tried using Physics.IgnoreCollision(trigger, player), but the trigger functionalities are still intact and working.
Due to in-game limitations, I can’t change the physics collision graph since that kind of trigger is a very specific one and modifying that now would break countless scenes. Is there some way I can achieve this without changing much code?
*NOTE: Althoug it is a sprite-based game, it is a full 3D environment and we are working with PhysX, not Box2D, that’s why I’m dealing with Physics instead of Physics2D.