wayfinder Posted June 1, 2014 Share Posted June 1, 2014 I wonder if it's something I'm doing wrong or a bug - I'm trying to set up my own separation for a sprite vs tilemap layer collision, but whatever I do, the standard separation seems to happen. I went through the calls and it looks like the (2nd?) separation check (in "if (separateTile)") actually separates, even when it's supposed to be overlap only, even when the processCallback returns false - am I going crazy? Link to comment Share on other sites More sharing options...
wayfinder Posted June 1, 2014 Author Share Posted June 1, 2014 found this in phaser.js: /** * An internal function. Use Phaser.Physics.Arcade.collide instead. * * @method Phaser.Physics.Arcade#collideSpriteVsTilemapLayer * @private * @param {Phaser.Sprite} sprite - The sprite to check. * @param {Phaser.TilemapLayer} tilemapLayer - The layer to check. * @param {function} collideCallback - An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them. * @param {function} processCallback - A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them. * @param {object} callbackContext - The context in which to run the callbacks. * @param {boolean} overlapOnly - Just run an overlap or a full collision. */ collideSpriteVsTilemapLayer: function (sprite, tilemapLayer, collideCallback, processCallback, callbackContext) {...... So apparently overlapOnly is never passed when performing a collision or overlap check! (Same for group vs tilemaplayer) Link to comment Share on other sites More sharing options...
lewster32 Posted June 1, 2014 Share Posted June 1, 2014 I would post this as an issue on the Phaser Github repo to ensure it gets seen and fixed. Link to comment Share on other sites More sharing options...
wayfinder Posted June 1, 2014 Author Share Posted June 1, 2014 Done! Now I'm on GitHub, I almost feel like a real coder lewster32 1 Link to comment Share on other sites More sharing options...
Recommended Posts