rotate group of object relative to center without physic

Hi,

i want to rotate the objects in a display group around center point

assume this code:
 

local gp=display.newGroup( ) local line1=display.newLine( 1,1,100,100 ) local line2=display.newLine( 100,0,0,100 ) gp:insert( line1 ) gp:insert( line2 ) gp.anchorX=.5 gp.anchorY=.5 gp:rotate( 90 )

but this group does not rotate relative to center point.I want to move group relative to red point like below image :

Screen%20Shot%202017-07-14%20at%207.56.0

Do display groups have anchors? For some reason I think not.

**UPDATE** I should have asked, “Do they respect anchors.”  By default, the answer is, "No."

Just place ‘centered’ objects at 0,0 in the group and move the group to the center of the screen.

Then rotate

no they have default anchor(0.5)

I  did not get what you mean

Thanks

Regardless of whether they have a value, groups do not respect anchors.

local gp = display.newGroup( ) gp.x = display.contentCenterX gp.y = display.contentCenterY local line1 =display.newLine( gp, -150,-150,150,150 ) line1.strokeWidth = 2 local line2 =display.newLine( gp, 150,-150,-150,150 ) line2.strokeWidth = 2 display.newRect( gp, 0, 0, 40, 40) transition.to( gp, { rotation = 360, time = 5000 }) 

Try this code to see what I mean by my earlier suggestion

Do display groups have anchors? For some reason I think not.

**UPDATE** I should have asked, “Do they respect anchors.”  By default, the answer is, "No."

Just place ‘centered’ objects at 0,0 in the group and move the group to the center of the screen.

Then rotate

no they have default anchor(0.5)

I  did not get what you mean

Thanks

Regardless of whether they have a value, groups do not respect anchors.

local gp = display.newGroup( ) gp.x = display.contentCenterX gp.y = display.contentCenterY local line1 =display.newLine( gp, -150,-150,150,150 ) line1.strokeWidth = 2 local line2 =display.newLine( gp, 150,-150,-150,150 ) line2.strokeWidth = 2 display.newRect( gp, 0, 0, 40, 40) transition.to( gp, { rotation = 360, time = 5000 }) 

Try this code to see what I mean by my earlier suggestion