API bug with collide function #2607

Closed
ErwanErwan opened this Issue Jul 8, 2016 · 1 comment

Projects

None yet

2 participants

@ErwanErwan

Hello,
First i want to thanks you for the awesome work you're doing to provide us such a good library.
when i was doing the tutorial, i found a bug in the API of the latest version of phazer (2.6)

the bug is because of the 'bounds' variable declaration in the function collideSpriteVsGroup at line 85199 of the phazer.js file (https://github.com/photonstorm/phaser/releases/download/v2.6.0/phaser.js)

the bounds variable should be assigned a empty object value in order to fix the bug (maybe you can find a more fancy way to fix it, but i tryed my way and its working)

so in order to fix the bug, you should replace (line 85208):

var bounds;
with

var bounds = {};

HOW TO REPRODUCE

download & test the part5(a world of physics) from the tutorial you provide (https://github.com/photonstorm/phaser/raw/master/resources/tutorials/02%20Making%20your%20first%20game/phaser_tutorial_02.zip)

just run the part5.html file in your browser and open your console, you will see the javascript error in the console.

Cheers

@photonstorm
Owner

Thanks for submitting this issue. We have fixed this, and the fix has been pushed to the dev branch.

@photonstorm photonstorm closed this Jul 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment