Merge pull request #5956 from samme/fix/physics-separate-intersects

Revert "Skip intersects check by argument"
This commit is contained in:
Richard Davey 2022-02-03 15:57:03 +00:00 committed by GitHub
commit e3ff03ff75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1346,14 +1346,12 @@ var World = new Class({
* @param {ArcadePhysicsCallback} [processCallback] - The process callback.
* @param {*} [callbackContext] - The context in which to invoke the callback.
* @param {boolean} [overlapOnly] - If this a collide or overlap check?
* @param {boolean} [intersects] - Assert that the bodies intersect and should not be tested before separation.
*
* @return {boolean} True if separation occurred, otherwise false.
*/
separate: function (body1, body2, processCallback, callbackContext, overlapOnly, intersects)
separate: function (body1, body2, processCallback, callbackContext, overlapOnly)
{
if (
!intersects &&
!body1.enable ||
!body2.enable ||
body1.checkCollision.none ||
@ -2002,7 +2000,7 @@ var World = new Class({
continue;
}
if (this.separate(bodyA, bodyB, processCallback, callbackContext, overlapOnly, true))
if (this.separate(bodyA, bodyB, processCallback, callbackContext, overlapOnly))
{
if (collideCallback)
{