diff options
author | Daniel Abbott <danielabbott@daniel-abbott.com> | 2018-12-22 19:26:18 -0700 |
---|---|---|
committer | Daniel Abbott <danielabbott@daniel-abbott.com> | 2018-12-22 19:26:18 -0700 |
commit | 572367552c9fc1bf28d19fc8b89861c63a196ccb (patch) | |
tree | f4caee5091788a85710f57b371c129f69d6d2557 | |
parent | 10e9221c49eddc05cb36c0b582060cac9e4c8cef (diff) |
`GodotRestInfoContactResultCallback::addSingleResult` now returns normal
`PhysicsDirectSpaceState.get_rest_info()` now provides normals in result
Addresses issue 24558
-rw-r--r-- | modules/bullet/godot_result_callbacks.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/bullet/godot_result_callbacks.cpp b/modules/bullet/godot_result_callbacks.cpp index 0117bb375f..3dc9f3fce5 100644 --- a/modules/bullet/godot_result_callbacks.cpp +++ b/modules/bullet/godot_result_callbacks.cpp @@ -304,6 +304,7 @@ btScalar GodotRestInfoContactResultCallback::addSingleResult(btManifoldPoint &cp colObj = static_cast<CollisionObjectBullet *>(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 { |