Hi,
I have two closely related questions, the first which led to the second:
-
How computationally expensive is it using many triggers and colliders (kinematic only)? I would assume that for OnTriggerEnter to be aware of a collision that behind the scenes it must be checked every frame?
-
This led me to wonder, is there a way to check (only once, at a precise time) if there are any current collisions for a particular object with a trigger collider? Due to the structure of my game I know exactly when the OnTriggerEnter would be activated, but it is still very useful to use in order to access the objects involved in the collisions.
In a sense, it would be useful to turn on the ‘OnTriggerEnter’ for a short period of time, and the turn it off again afterwards since I know that I will have no relevant collisions. If it would be a form of optimization then I would like to try it.
Thanks,
Matt