I have a group of objects [ circle and some lines] in a group. i wish to rotate the entire group by an angle[say 90] where the rotation being on the center of the
circle. Yet when rotating the group it doesn’t rotate on the offset it set to be the center of the circle.
Any help or comments will be appreciated thanks!.
@JohnWiseman as requested here is my code.
var x = petridishGroup.getChildren()[0].getX();
var y = petridishGroup.getChildren()[0].getY();
var offX = x + petridishGroup.getChildren()[0].getRadius().x;
var offY = y + petridishGroup.getChildren()[0].getRadius().y;
petridishGroup.setOffset(offX, offY);
petridishGroup.setRotation(45);
gamePlayLayer.draw();
Solution to the problem is to place the circle at 0,0 which will become the center of the circle and then rotate the group.
Offset will be 0,0 which will be rather easier to keep track of the offset and the rotation offset