Jump to content

Phaser Sprite dimensions with child graphics always return 32x32?


cikamika
 Share

Recommended Posts

var rectGraphics = new Phaser.Graphics( this.game, 0, 0 );rectGraphics.beginFill( 0xFF0000 );rectGraphics.drawRect( 0, 0, 100, 100 );rectGraphics.endFill();mySprite = this.game.add.sprite( 100, 100 );mySprite.addChild( rectGraphics );

mySprite.width and mySprite.height always returns 32, but the graphics dimensions are 100x100?

mySprite.getBounds() and mySprite.getLocalBounds() are also set to 32x32.

 

How do you get Phaser to return proper dimensions?

Link to comment
Share on other sites

  • 1 year later...
 Share

  • Recently Browsing   0 members

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