From 7323f7998bf5025b182aa208b56cececdbfd0c2d Mon Sep 17 00:00:00 2001 From: John Teasdale Date: Sun, 19 Aug 2018 13:14:12 -0700 Subject: [PATCH] Bullet picking will now ignore objects without input_ray_pickable --- modules/bullet/godot_result_callbacks.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/bullet/godot_result_callbacks.cpp b/modules/bullet/godot_result_callbacks.cpp index 197550d6867..815ad9c10f6 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(proxy0->m_clientObject); CollisionObjectBullet *gObj = static_cast(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; }