How to force a OnTriggerEnter/Stay function to run?
Hi.
I've ran into a little bit of a problem where my goal is to instanstiate an object and when that object is created, for it to react accordingly to what its triggers find, if they either collide with something or don't.
The problem. When the object is spawned in, if its triggers are already inside something, the triggers won't react unless they are moved out of whatever they are inside of, and then moved back into what they were just in. Only then will the code run the OnTrigger functions.
I was hoping if someone knew if there's a way to force run the function. Sadly calling it inside code doesn't work. Would anyone know to explain this or know if there's a way to make the script run the OnTrigger function? Thanks.
You can't run them. You shouldn't have to either. If you are at a point where you need to run them manually, why would you then not run a normal method? The whole purpose of events is that they get raised through context.