Bullet picking will now ignore objects without input_ray_pickable
This commit is contained in:
parent
faa49c1829
commit
7323f7998b
|
@ -51,8 +51,8 @@ bool GodotClosestRayResultCallback::needsCollision(btBroadphaseProxy *proxy0) co
|
||||||
if (needs) {
|
if (needs) {
|
||||||
btCollisionObject *btObj = static_cast<btCollisionObject *>(proxy0->m_clientObject);
|
btCollisionObject *btObj = static_cast<btCollisionObject *>(proxy0->m_clientObject);
|
||||||
CollisionObjectBullet *gObj = static_cast<CollisionObjectBullet *>(btObj->getUserPointer());
|
CollisionObjectBullet *gObj = static_cast<CollisionObjectBullet *>(btObj->getUserPointer());
|
||||||
if (m_pickRay && gObj->is_ray_pickable()) {
|
if (m_pickRay && !gObj->is_ray_pickable()) {
|
||||||
return true;
|
return false;
|
||||||
} else if (m_exclude->has(gObj->get_self())) {
|
} else if (m_exclude->has(gObj->get_self())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue