Jump to content

Child Sprite Positioning


sdgsgsdfgfdg
 Share

Recommended Posts

Hi, sprites have "anchor". Anchor is 0,0 by default and sprite is positioned at x, y with his top left corner. If you want to center sprite at given position, set its anchor to 0.5, 0.5.

 

Child sprites have their x, y relative to its parent. You can also change their anchor.

 

Look at this example: http://phaser.io/examples/v2/sprites/anchor

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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