In Phaser 2 it was possible to add sprites to a group and then move the group as a whole. All the sprite positions in the group were relative to the group position, so if the group is at pos 0,0 and sprite is at 40,30 it works as normal. But if you then moved the group 100 pixels to left, all sprites in group would move, while each individual sprite position was unchanged. So the sprite would be on screen at position 140,30 while its x,y position was still 40,30.
It seems that this works differently in Phaser 3, is something like that still possible? The group position x,y can be set at create
but when I try to change the value it seems that group.x
and group.y
are undefined. I’ve looked here and here but couldn’t find it.
Also, I’ve used the group scale effect in Phaser2, which was really useful. You could set the anchor of the group and then scaling the group would scale all sprites around that origin point, which was helpful for some animation effects.