Hi,
I’m building a fairly complex physics LODing system for a game prototype, with the target platform being iPhone.
I’m using OnCollisionStay to effectively count collisions (I can’t use Enter / Exit only, as I’m swapping out differnt rigid bodies due to the LODing, and this interferes with the consistency of using Enter/Exit only)
What I’ve found, is having the Stay callback active (even though it’s doing almost nothing) reduces my performance massively.
I actually only need the collision count for 1 block at a time, so ideally I’d like to leave the callbacks disabled for all the other objects, and enable them for the object I’m interested in.
Is this possible?
I tried adding a seperate script, and only enabling this script for the object I’m interested in, but it appears collision callbacks within a script are called even if the script itself is not enabled.
Is my only option to create a different GameObject and toggle this in / out as I need the callbacks enabled / disabled?
Cheers,
Elton