|
|
|
| Author |
Message |
piratePanda
 Posts: 225
 |
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? _________________ Yar! Hand ovar tha bamboo, says I!
Last edited by piratePanda on Wed Nov 25, 2009 4:29 pm; edited 1 time in total |
|
ThomasEgi
 Posts: 1820 Location: Germany,Koblenz
 |
lots of little and one big boil down to the same.. lots and lots of colilsion checks.
the art is. to avoid all unnccessary checks.
that means. structure your nodes that as many checks as possible can be avoided.
quadtree or octree structures are very good for this purpose.
i suggest you search for treeform's octree script. it's very useful to create highly efficient collision geometry from real visible geometry. _________________ rig: dell inspiron 1720; ubuntu 9.10_64 ;panda 1.7.0
may a catgirl be with you. nyaan nyan~~ ^.^ |
|
piratePanda
 Posts: 225
 |
Unfortunately the egg octree isn't quite what I'm looking for, since I'm using multiple eggs to create a dynamic world instead of a static world in a single egg. You did answer my question though, so thanks. :) _________________ Yar! Hand ovar tha bamboo, says I! |
|
treeform
 Posts: 2027 Location: Seattle
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
| | |