From cf2ebf5d473f4e7e32ae278973d613bb5c9001a9 Mon Sep 17 00:00:00 2001 From: Daniel Abbott Date: Sat, 22 Dec 2018 19:26:18 -0700 Subject: [PATCH] `GodotRestInfoContactResultCallback::addSingleResult` now returns normal `PhysicsDirectSpaceState.get_rest_info()` now provides normals in result Addresses issue 24558 (cherry picked from commit 572367552c9fc1bf28d19fc8b89861c63a196ccb) --- modules/bullet/godot_result_callbacks.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/bullet/godot_result_callbacks.cpp b/modules/bullet/godot_result_callbacks.cpp index 989e14305c0..dd6badb5562 100644 --- a/modules/bullet/godot_result_callbacks.cpp +++ b/modules/bullet/godot_result_callbacks.cpp @@ -235,6 +235,7 @@ btScalar GodotRestInfoContactResultCallback::addSingleResult(btManifoldPoint &cp colObj = static_cast(colObj1Wrap->getCollisionObject()->getUserPointer()); m_result->shape = cp.m_index1; B_TO_G(cp.getPositionWorldOnB(), m_result->point); + B_TO_G(cp.m_normalWorldOnB, m_result->normal); m_rest_info_bt_point = cp.getPositionWorldOnB(); m_rest_info_collision_object = colObj1Wrap->getCollisionObject(); } else {