diff options
author | eska <eska@eska.me> | 2015-10-10 02:33:26 +0200 |
---|---|---|
committer | eska <eska@eska.me> | 2015-10-10 02:33:26 +0200 |
commit | 375a7a727f215a1d790de9caf82cb2a5e89cf711 (patch) | |
tree | 68c10560a6c220bb7d72e70e7949e610731200a4 | |
parent | 13ff4bde650149577185d6d4c61b924cf0896d98 (diff) |
Fix 3D Area mask matching
-rw-r--r-- | servers/physics/space_sw.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/servers/physics/space_sw.cpp b/servers/physics/space_sw.cpp index d36b004989..ba1c737530 100644 --- a/servers/physics/space_sw.cpp +++ b/servers/physics/space_sw.cpp @@ -34,10 +34,10 @@ _FORCE_INLINE_ static bool _match_object_type_query(CollisionObjectSW *p_object, uint32_t p_layer_mask, uint32_t p_type_mask) { - if ((p_object->get_layer_mask()&p_layer_mask)==0) - return false; + if (p_object->get_type()==CollisionObjectSW::TYPE_AREA) + return p_type_mask&PhysicsDirectSpaceState::TYPE_MASK_AREA; - if (p_object->get_type()==CollisionObjectSW::TYPE_AREA && !(p_type_mask&PhysicsDirectSpaceState::TYPE_MASK_AREA)) + if ((p_object->get_layer_mask()&p_layer_mask)==0) return false; BodySW *body = static_cast<BodySW*>(p_object); |