I wish to implement collision 'layers' in which sets of objects will belong to different
layers via my own bitmasking.
Currently it works fine except that all the objects are tested at the broadphase level where
the filter layer test and my own filter-groups/mask system reside.
I am wondering if it is possible to move my layer tests 'up' to before the broadphase test?
Or if this is the ideal case for simply having multiple worlds?
Thanks for any insights!
Carl
filter layers-of-objects before broadphase
-
Erwin Coumans
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: filter layers-of-objects before broadphase
It is likely better not to move any filter test before the broadphase.
What broadphase are you using? If you use the btDbvtBroadphase, the broadphase tests shouldn't be a bottleneck.
Thanks,
Erwin
What broadphase are you using? If you use the btDbvtBroadphase, the broadphase tests shouldn't be a bottleneck.
Thanks,
Erwin
-
Carl
- Posts: 7
- Joined: Wed Oct 27, 2010 3:11 pm
Re: filter layers-of-objects before broadphase
hello, thanks for the comment.
I am using the btDbvtBroadphase.
I guess I'm being a bit theoretical with this because my application will be driven by user generated data.
So I am just trying to ensure that I do not miss anything that will help performance.
If I keep the system the way it is, it will be fine, except for my knowledge that broadphase testing will be
done on batches of objects that may be on different 'layers' and therefore are therefore never possibly colliding, but the broadphase testing will occur anyway.
Maybe this is when we just let the tests happen even though they will always be filtered
out by a layer-filter system, Or, maybe this is where its better to create a new collision-world for each layer.
Thanks,
Carl
I am using the btDbvtBroadphase.
I guess I'm being a bit theoretical with this because my application will be driven by user generated data.
So I am just trying to ensure that I do not miss anything that will help performance.
If I keep the system the way it is, it will be fine, except for my knowledge that broadphase testing will be
done on batches of objects that may be on different 'layers' and therefore are therefore never possibly colliding, but the broadphase testing will occur anyway.
Maybe this is when we just let the tests happen even though they will always be filtered
out by a layer-filter system, Or, maybe this is where its better to create a new collision-world for each layer.
Thanks,
Carl