Skip to content

Commit f4277ef

Browse files
committed
Alternative snooker-ball like collision test.
1 parent a193ad5 commit f4277ef

3 files changed

Lines changed: 308 additions & 142 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,10 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
347347
* World.separate has been optimized to cut down on the number of calls to `intersect` from 3 calls per Game Object collision check, to 2. So if you were colliding 50 sprites it will reduce the call count from 150 to 100 per frame. It also reduces the calls made to `seperateX` and `seperateY` by the same factor.
348348
* Two immovable bodies would never set their overlap data, even if an overlap only check was being made. As this is useful data to have this has been changed. Two immovable bodies will still never separate from each other, but they _will_ have their `overlapX` and `overlapY` properties calculated now.
349349

350-
351350
### Updates
352351

353352
* TypeScript definitions fixes and updates (thanks @clark-stevenson)
354-
* Docs typo fixes (thanks @thiagojobson)
353+
* Docs typo fixes (thanks @thiagojobson @hayesmaker)
355354
* Removed a `console.log` from the TilingSprite generator.
356355
* Sound.position can no longer become negative, meaning calls to AudioContextNode.start with negative position offsets will no longer throw errors (thanks @Weedshaker #2351 #2368)
357356
* The default state of the internal property `_boundDispatch` in Phaser.Signal is now `false`, which allows for use of boundDispatches (thanks @alvinlao #2346)

src/physics/arcade/Body.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,12 @@ Phaser.Physics.Arcade.Body = function (sprite) {
282282
*/
283283
this.overlapY = 0;
284284

285+
/**
286+
* If `Body.isCircle` is true, and this body collides with another circular body, the amount of overlap is stored here.
287+
* @property {number} overlapR - The amount of overlap during the collision.
288+
*/
289+
this.overlapR = 0;
290+
285291
/**
286292
* If a body is overlapping with another body, but neither of them are moving (maybe they spawned on-top of each other?) this is set to true.
287293
* @property {boolean} embedded - Body embed value.

0 commit comments

Comments
 (0)