I’ve been running profiling tests to improve the performance of my game, and I’ve discovered something that seems to be hogging an absurd amount of resources. The function in question is called “PhysX.ScNPhaseCore.triggerInteractionWork”.
It’s using up 40ms, which seems way too high compared to rest of the items listed there. I have a rough idea where this call is coming from, but I don’t know exactly what objects are causing it occur. What’s more is that I don’t know why it’s being made exactly, and why there are 173 calls of it. There’s nothing in the documentation that lists what it does, but I’m assuming it has to do with the OnTriggerEnter function; which is strange, because there’s already a profiler item for those types of calls under Physics.ProcessReports. It’s true that I have many triggers in my scene, but the problem only seems to flare up when a few entities enter just a couple overlapping triggers. I even tried restricting the Physics layer to see if my triggers would ignore some moving parts on the enemies, but it didn’t seem to help. Maybe the problem is coming from somewhere else…? But I have no clue where to look since, even in a Deep Profile, there’s no information on what objects called it. In the “show related objects” everything is just N/A.
Does anyone know what this function is supposed to do? How can I track down what’s causing it be called so many times? Do I have to just use trial and error to eliminate the possibilities one by one? Thanks in advance!