I’m working on setting up some collisions in my game. My intention is to break up the level by region to reduce the number of collision checks necessary each pass. When I was thinking of how to do this, I decided I needed to have my regions overlapping slightly to make sure that potential collisions didn’t go undetected at region borders. The problem this presents is that there are times when a character may be in the overlap between two regions, and thus must be checked for collision by objects in both regions.
I had originally thought that I would just parent the objects in a given region to a particular node and feed that node to the traverser. Since a nodepath can only have one parent (I think) it doesn’t seem like this is a viable option because of those times when things are in two regions. I was thinking instead that I might make lists of ojbects that correspond to regions, since I can put a nodepath into multiple lists, and then traverse each object in the appropriate lists individually.
My question is, will doing alot of little collision checks be more wasteful of system resources than doing one big collision check? Is that something I should worry about? Is there another way to get around this problem that would be better?