jake.caron Posted September 21, 2018 Share Posted September 21, 2018 Hi All, I just switched from Phaser 2 to Phaser 3 today and I am running into a group issue. I am trying to move a group on the x or y axis, however it's not actually moving. Parent //*******SCENE STUFF***********// create() { this.sun = new Sun(this); this.sun.x = this.size.width * .5; } //*******SCENE STUFF***********// Child export default class Preloader_Sun extends phaser.GameObjects.Group { constructor(scene) { super(scene); this.mainImage = this.create(0, 0, 'preloader_sun').setOrigin(.5); } } Any thought on what might be happening? Thanks! Jake Link to comment Share on other sites More sharing options...
jake.caron Posted September 21, 2018 Author Share Posted September 21, 2018 It does appear as though a group does not own coordinates like a sprite does. Is this intentional? If so, what is the advised way of moving a group of sprites besides updating all children in a loop? Link to comment Share on other sites More sharing options...
prob Posted September 21, 2018 Share Posted September 21, 2018 Yes, groups can't be positioned, scaled, etc. You can use containers as an alternative. jake.caron 1 Link to comment Share on other sites More sharing options...
Recommended Posts