Skip to content

Commit 75fa876

Browse files
committed
Small tweak to make Search Distance Fallback more robust
1 parent 17bfa62 commit 75fa876

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

kk_bullet_constraints_builder.zip

-2 Bytes
Binary file not shown.

kk_bullet_constraints_builder/builder_prep.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -873,9 +873,9 @@ def calculateContactAreaBasedOnBoundaryBoxesForPair(objA, objB, qNonManifold=0,
873873
if overlapXF < -searchDist or overlapYF < -searchDist or overlapZF < -searchDist:
874874
qSkipConnect = 1
875875
else: overlapX, overlapY, overlapZ = max(0,overlapXF), max(0,overlapYF), max(0,overlapZF)
876-
else: qSkipConnect = 1
876+
elif not props.searchDistanceFallback: qSkipConnect = 1
877877

878-
if not qAccurate or qSkipConnect:
878+
if not qAccurate or qSkipConnect or props.searchDistanceFallback:
879879
### Calculate simple overlap of boundary boxes for contact area calculation (project along all axis')
880880
overlapX = max(0, min(bbAMax[0],bbBMax[0]) -max(bbAMin[0],bbBMin[0]))
881881
overlapY = max(0, min(bbAMax[1],bbBMax[1]) -max(bbAMin[1],bbBMin[1]))

0 commit comments

Comments
 (0)