andrei.nicolae Posted June 25, 2018 Share Posted June 25, 2018 Hi guys, How can you change the anchor of a sprite inside a group? For a sprite outside the group I use this.add.sprite(100,100, 'sprite').setOrigin(0,0); I tried the next code but It didn't work leprosy = this.add.group([{ key: '001_leprosy', setXY: { x: 444, y: 115 }, setOrigin : {x:0, y:0} } ]); Any ideas? Thanks. Link to comment Share on other sites More sharing options...
scope2229 Posted June 26, 2018 Share Posted June 26, 2018 this.enemies = this.physics.add.group({ key: 'tai_fighter1', createMultiple: 5, enableBody: true, physicsBodyType: Phaser.Physics.ARCADE, frame: 4, angle: 180, checkWorldBounds: true, outOfBoundsKill: true }) Phaser.Actions.setOrigin(this.enemies.getChildren(), -0.7, -0.7) could you change the origin the same way i scale each child of a group ????? Link to comment Share on other sites More sharing options...
Recommended Posts