Browse Source

Fixed #41040 in an alternative way now that #39726 is reverted

Andrea Catania 4 years ago
parent
commit
2e8cb8a9e2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/bullet/space_bullet.cpp

+ 1 - 1
modules/bullet/space_bullet.cpp

@@ -177,7 +177,7 @@ bool BulletPhysicsDirectSpaceState::cast_motion(const RID &p_shape, const Transf
 	bt_xform_to.getOrigin() += bt_motion;
 	bt_xform_to.getOrigin() += bt_motion;
 
 
 	if ((bt_xform_to.getOrigin() - bt_xform_from.getOrigin()).fuzzyZero()) {
 	if ((bt_xform_to.getOrigin() - bt_xform_from.getOrigin()).fuzzyZero()) {
-		shape->destroy_bt_shape(btShape);
+		bulletdelete(btShape);
 		return false;
 		return false;
 	}
 	}