mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-18 12:43:44 -04:00
Change to allow collision with geometry
This commit is contained in:
parent
69097c9ec4
commit
eac3e705e4
@ -92,13 +92,15 @@ any_in_bounds() {
|
|||||||
int num_colliders = get_num_colliders();
|
int num_colliders = get_num_colliders();
|
||||||
for (int c = 0; c < num_colliders; c++) {
|
for (int c = 0; c < num_colliders; c++) {
|
||||||
if (has_collider(c)) {
|
if (has_collider(c)) {
|
||||||
|
qpCollisionNode *collider = get_node(c);
|
||||||
bool is_in = false;
|
bool is_in = false;
|
||||||
|
|
||||||
// Don't even bother testing the bounding volume if there are
|
// Don't even bother testing the bounding volume if there are
|
||||||
// no collide bits in common between our collider and this
|
// no collide bits in common between our collider and this
|
||||||
// node.
|
// node.
|
||||||
CollideMask from_mask = get_node(c)->get_from_collide_mask();
|
CollideMask from_mask = collider->get_from_collide_mask();
|
||||||
if ((from_mask & node()->get_net_collide_mask()) != 0) {
|
if (collider->get_collide_geom() ||
|
||||||
|
(from_mask & node()->get_net_collide_mask()) != 0) {
|
||||||
// There are bits in common, so go ahead and try the
|
// There are bits in common, so go ahead and try the
|
||||||
// bounding volume.
|
// bounding volume.
|
||||||
const GeometricBoundingVolume *col_gbv =
|
const GeometricBoundingVolume *col_gbv =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user