Merge pull request #34225 from madmiraal/fix-34210
Add check for zero length motion at beginning of each sweep test loop in SpaceBullet::test_body_motion
This commit is contained in:
commit
0b185278f3
1 changed files with 2 additions and 2 deletions
|
@ -945,7 +945,7 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform &p_f
|
||||||
|
|
||||||
btVector3 motion;
|
btVector3 motion;
|
||||||
G_TO_B(p_motion, motion);
|
G_TO_B(p_motion, motion);
|
||||||
if (!motion.fuzzyZero()) {
|
{
|
||||||
// Phase two - sweep test, from a secure position without margin
|
// Phase two - sweep test, from a secure position without margin
|
||||||
|
|
||||||
const int shape_count(p_body->get_shape_count());
|
const int shape_count(p_body->get_shape_count());
|
||||||
|
@ -960,7 +960,7 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform &p_f
|
||||||
motionVec->end();
|
motionVec->end();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (int shIndex = 0; shIndex < shape_count; ++shIndex) {
|
for (int shIndex = 0; shIndex < shape_count && !motion.fuzzyZero(); ++shIndex) {
|
||||||
if (p_body->is_shape_disabled(shIndex)) {
|
if (p_body->is_shape_disabled(shIndex)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue