Coin-coin le Canapin wrote:That's cool.
Do you know why the overlap events is faster than the collision one ?
To be honest, I have no clue according to the manual, even though its not an in-depth explanation they should do the exact same thing.
But did a test of "On collision", "Overlapping" and "Overlapping with optimization" all screenshots are taken after its started so it changes a little bit up and down.
As you can see, the "on collision" and "Overlapping" is practically the same in the one named "Low object count", however the CPU util and FPS is highly different. Strangely enough if you look at the Collision checks /sec, its only 43513 for the "On collision" while its 80812 for the "Overlapping" even though the approx. collision checks per tick is higher for "On collision" than overlapping. Regarding the optimized one, there is not a lot to add, think the numbers speaks for it self, and it have no problems with such a low number of objects.
On the "High object count" however things goes really from for "On collision" the performance was so bad, that it couldn't even register the amount of collision checks. However the CPU again goes to max and the FPS drops massively. Where as the "Is overlapping" gives a lot better performance, however still uses a lot of CPU and also take a quite big hit to the FPS. And with the "optimized" version it is barely noticeable, except it also uses a lot of CPU, however it doesn't hurt performance FPS wise.
So what exactly is going on with the "On collision" I don't know, because I would assume that "Is overlapping" is doing the same amount of checks as it does, at least according to the manual. And the optimized version as you know, is based on that it only cares about which object it can collide with that are also the closest, so it logically reduces the amount of checks needed to be made each ticks by a lot.
But would probably need Ashley to explain it, because I don't think its possible to find the answer in the manual at least. So its just something to be aware of I think, if performance drops, you should make sure to at least not use "On collision"