proyb2 Posted August 21, 2015 Share Posted August 21, 2015 What example could I get the sprite1 in world XY position after adding in a group?sprite1=game.make.sprite(17, 16, 'object1')sprite1.name="position1"sprite1.x=x-7sprite1.y=y+8ngroup.add(sprite1) Link to comment Share on other sites More sharing options...
tips4design Posted August 21, 2015 Share Posted August 21, 2015 Maybe something like this:sprite1.x = x - ngroup.x;sprite1.y = y - ngroup.y; Link to comment Share on other sites More sharing options...
wayfinder Posted August 21, 2015 Share Posted August 21, 2015 world :Phaser.Point The world coordinates of this Game Object in pixels. so sprite1.world.x and sprite1.world.y proyb2 and Tilde 2 Link to comment Share on other sites More sharing options...
proyb2 Posted August 21, 2015 Author Share Posted August 21, 2015 Problem solved with chosen answer. Link to comment Share on other sites More sharing options...
Recommended Posts