I have a series of horizontally-lined sprites in Phaser 3:
const sprite1 = this.add.sprite(20, 40, 'diamonds');
const sprite2 = this.add.sprite(50, 40, 'diamonds');
const sprite3 = this.add.sprite(80, 40, 'diamonds');
const sprite4 = this.add.sprite(110, 40, 'diamonds');
const sprite5 = this.add.sprite(140, 40, 'diamonds');
const sprite6 = this.add.sprite(170, 40, 'diamonds');
which produce the following:
When I rotate sprite3 by 90 degrees, I want the subsequent sprites to be rotated as well as shown below:
If I then rotate sprite5 by 90 degrees, I want the following output:
I have unsuccessfully tried using Phaser.Container. Any help?



Well that what you want to achieve is not really possible out-of-the-box or with a container, since you would have to nest them several times. This approach can only "work" if you always rotate those specific sprites, but I assume this is not the goal. So a solution, could be to calculate the new positions of the following sprites.
Using Vectors and an Array should make this task easy.
Here a short demo:
(this is just a proof of concept an would/should be optimized)