Jump to content

game.debug.spriteBounds ignores this.player.body.setSize


Recommended Posts

I have this

this.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 size

ie. 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


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...