Skip to content

Commit

Permalink
Merge pull request #56801 from Riordan-DC/compound-collision-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored May 19, 2022
2 parents 78a9d21 + 941a440 commit 5d9c7ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/bullet/space_bullet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,8 @@ bool SpaceBullet::RFP_convex_convex_test(const btConvexShape *p_shapeA, const bt
// Initialize GJK input
btGjkPairDetector::ClosestPointInput gjk_input;
gjk_input.m_transformA = p_transformA;
// Avoid repeat penetrations
gjk_input.m_transformA.getOrigin() += r_delta_recover_movement;
gjk_input.m_transformB = p_transformB;

// Perform GJK test
Expand Down Expand Up @@ -1320,6 +1322,8 @@ bool SpaceBullet::RFP_convex_world_test(const btConvexShape *p_shapeA, const btC
/// Contact test

btTransform tA(p_transformA);
// Avoid repeat penetrations
tA.getOrigin() += r_delta_recover_movement;

btCollisionObjectWrapper obA(nullptr, p_shapeA, p_objectA, tA, -1, p_shapeId_A);
btCollisionObjectWrapper obB(nullptr, p_shapeB, p_objectB, p_transformB, -1, p_shapeId_B);
Expand Down

0 comments on commit 5d9c7ea

Please sign in to comment.