mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 01:38:23 +00:00
Merge pull request #5391 from samme/fix/overlapR
Set Arcade.Body#overlapR in separateCircle()
This commit is contained in:
commit
d397551b3d
1 changed files with 3 additions and 0 deletions
|
@ -1521,6 +1521,9 @@ var World = new Class({
|
|||
overlap = (body1.halfWidth + body2.halfWidth) - DistanceBetween(body1.center.x, body1.center.y, body2.center.x, body2.center.y);
|
||||
}
|
||||
|
||||
body1.overlapR = overlap;
|
||||
body2.overlapR = overlap;
|
||||
|
||||
// Can't separate two immovable bodies, or a body with its own custom separation logic
|
||||
if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateX || body2.customSeparateX)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue