summaryrefslogtreecommitdiffstats
path: root/modules/bullet/space_bullet.cpp
diff options
context:
space:
mode:
authorAndreaCatania <info@andreacatania.com>2017-12-10 12:20:36 +0100
committerAndreaCatania <info@andreacatania.com>2017-12-10 12:20:36 +0100
commit785173e899862bfa9ce65ee4cd8c718d120d2c0f (patch)
treec16434ed1b341aae8f3f3b0e39e32c7ba1345a9d /modules/bullet/space_bullet.cpp
parenta5b3c9cae010c98ec692bc08463cde25f8f9ac67 (diff)
downloadredot-engine-785173e899862bfa9ce65ee4cd8c718d120d2c0f.tar.gz
Ray cast return shape id. Fixes #14473
Diffstat (limited to 'modules/bullet/space_bullet.cpp')
-rw-r--r--modules/bullet/space_bullet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index c1f6e81734..3ce4b294db 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/modules/bullet/space_bullet.cpp
@@ -97,7 +97,7 @@ bool BulletPhysicsDirectSpaceState::intersect_ray(const Vector3 &p_from, const V
B_TO_G(btResult.m_hitNormalWorld.normalize(), r_result.normal);
CollisionObjectBullet *gObj = static_cast<CollisionObjectBullet *>(btResult.m_collisionObject->getUserPointer());
if (gObj) {
- r_result.shape = 0;
+ r_result.shape = btResult.m_shapeId;
r_result.rid = gObj->get_self();
r_result.collider_id = gObj->get_instance_id();
r_result.collider = 0 == r_result.collider_id ? NULL : ObjectDB::get_instance(r_result.collider_id);