gingerbeardman Posted February 2, 2015 Share Posted February 2, 2015 I have thisthis.player = this.add.sprite(0,0,'player');this.player.body.setSize(34,43, 5,1);and this render: function(){ game.debug.spriteBounds(this.player);}I see this: Debug green area is original sprite sizeie. game.debug.spriteBounds ignores this.player.body.setSize I expected to see only red area highlighted (added manually in my paint app) Is it possible to do this? I want to have more fine tuned visibility of my collision detection areas. (or should rendering sprite bounds have an option to take note of setSize?) Link to comment Share on other sites More sharing options...
gingerbeardman Posted February 2, 2015 Author Share Posted February 2, 2015 My workaround in render:var rect = new Phaser.Rectangle( this.player.body.x, this.player.body.y, this.player.body.width, this.player.body.height);game.debug.geom( rect, 'rgba(255,0,0, 0.5)' ) ; Link to comment Share on other sites More sharing options...
rich Posted February 3, 2015 Share Posted February 3, 2015 function render() { game.debug.bodyInfo(sprite, 32, 32); game.debug.body(sprite); } Link to comment Share on other sites More sharing options...
gingerbeardman Posted February 3, 2015 Author Share Posted February 3, 2015 Cheers Link to comment Share on other sites More sharing options...
Recommended Posts