summaryrefslogtreecommitdiff
path: root/modules/bullet/godot_result_callbacks.cpp
diff options
context:
space:
mode:
authorJohn Teasdale <jpteasdale@gmail.com>2018-08-19 13:14:12 -0700
committerJohn Teasdale <jpteasdale@gmail.com>2018-08-19 13:14:12 -0700
commit7323f7998bf5025b182aa208b56cececdbfd0c2d (patch)
treee15aef15c1923915fd8f52550672b1027fd8018c /modules/bullet/godot_result_callbacks.cpp
parentfaa49c182978b3fe74e7aad65fb761c2881f009c (diff)
Bullet picking will now ignore objects without input_ray_pickable
Diffstat (limited to 'modules/bullet/godot_result_callbacks.cpp')
-rw-r--r--modules/bullet/godot_result_callbacks.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/bullet/godot_result_callbacks.cpp b/modules/bullet/godot_result_callbacks.cpp
index 197550d686..815ad9c10f 100644
--- a/modules/bullet/godot_result_callbacks.cpp
+++ b/modules/bullet/godot_result_callbacks.cpp
@@ -51,8 +51,8 @@ bool GodotClosestRayResultCallback::needsCollision(btBroadphaseProxy *proxy0) co
if (needs) {
btCollisionObject *btObj = static_cast<btCollisionObject *>(proxy0->m_clientObject);
CollisionObjectBullet *gObj = static_cast<CollisionObjectBullet *>(btObj->getUserPointer());
- if (m_pickRay && gObj->is_ray_pickable()) {
- return true;
+ if (m_pickRay && !gObj->is_ray_pickable()) {
+ return false;
} else if (m_exclude->has(gObj->get_self())) {
return false;
}