`GodotRestInfoContactResultCallback::addSingleResult` now returns normal

`PhysicsDirectSpaceState.get_rest_info()` now provides normals in result
Addresses issue 24558

(cherry picked from commit 572367552c)
This commit is contained in:
Daniel Abbott 2018-12-22 19:26:18 -07:00 committed by Rémi Verschelde
parent 49d724ac52
commit cf2ebf5d47
1 changed files with 1 additions and 0 deletions

View File

@ -235,6 +235,7 @@ btScalar GodotRestInfoContactResultCallback::addSingleResult(btManifoldPoint &cp
colObj = static_cast<CollisionObjectBullet *>(colObj1Wrap->getCollisionObject()->getUserPointer()); colObj = static_cast<CollisionObjectBullet *>(colObj1Wrap->getCollisionObject()->getUserPointer());
m_result->shape = cp.m_index1; m_result->shape = cp.m_index1;
B_TO_G(cp.getPositionWorldOnB(), m_result->point); 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_bt_point = cp.getPositionWorldOnB();
m_rest_info_collision_object = colObj1Wrap->getCollisionObject(); m_rest_info_collision_object = colObj1Wrap->getCollisionObject();
} else { } else {