Hey guys, I have an optimization issue I can't quite solve. Any help would be imensely appreciated, thanks. Here it goes:
For this example's sake, my character will be called object TYPE A
Image I have a layout with 200 objects TYPE B
Now, around my character, there are always a few scattered objects of TYPE C that move with the character (TYPE A)
For one purpose or another, I need to detect all the time a TYPE C object is overlapping a TYPE B object, and there are a hell lot of TYPE B objects, and that seems to be a very heavy thing to do with this many TYPE B objects. (NOTE: TYPE C objects are also ~ 20).
So my question would be, how do I narrow down the TYPE B Is Overlapping TYPE C object check only to near the TYBE A object. There are a few sub-points that make this a tad more difficult.
a) I need to perform checks all the time a TYBE B object is overlapping a TYPE C object as the TYPE C object has changing properties that then reflect on the TYBE B object, so I perform these checks every 0.5 sec. - This means I can't use On COllision as it is a one time thing.
b)There will be more that one TYPE A object, despite me giving the example above as it being the player character, that was kinda misleading, cause there will be other TYPE objects with their seperate TYPE C objects (context is not an issues here, every TYPE C object knows to which TYPE A object it belongs, however the effect when overlapping with a TYPE B object is the same)
c) I've tried picking TYPE B objects to by distance being under something from the TYPE A Object and to only check for overlapping with those but I either did it wrong or it had no effect on my FPS.
Any clarity would be of much help, thanks.