[SOLVED] Set sprite rotation when creating a new group

Hello ! When I create a new group, I want to set the Angle for each sprite. What is the keyword for that ? I tried “angle” and “rotation” but it doesn’t work.

this.roadsGroup = this.add.group([
{key:“road”, setXY:{x:32,y:32}},
{key:“bridge”, setXY:{x:64,y:32}}
]);

Did you already done that before ?

According to the documentation, it should be setRotation with a value:

this.roadsGroup = this.add.group([
    {key:“road”, setXY:{x:32,y:32}, setRotation: {value: 45}},
    {key:“bridge”, setXY:{x:64,y:32}, setRotation: {value: 90}}
]);

@Telinc1 Thank you ! I wasn’t able to find the information in the documentation, thank you for the link !
Just a quick note after some test, it seems that the “value” as to be set in radian rather that in degree.

Ah, that wouldn’t surprise me. I didn’t actually check which unit was used in this case and just assumed it was degrees for an easier demonstration. On second thought, the API uses degrees for angles, not rotations. Sorry if that confused you.