So I want to run a transition effect for a display group.
For example:
I have 3 rectangle and they all move to the same point.
Here is where it starts:
Here is where they all SHOULD transition to
But here is where they all transitioned to:
Here is my code:
local rectangle\_group = display.newGroup() local rect1 = display.newRect(50,100,50,50) rect1:setFillColor(0,1,0) local rect2 = display.newRect(rectangle\_group,50,200,50,50) rect2:setFillColor(1,1,0) local rect3 = display.newRect(rectangle\_group,50,300,50,50) rect3:setFillColor(0,1,1) transition.to(rect1,{time=1000,x=250,y=100}) transition.to(rectangle\_group,{time=1000,x=250,y=100})
It works when I change the transition code to transition each object individually:
transition.to(rect1,{time=1000,x=250,y=100}) transition.to(rect2,{time=1000,x=250,y=100}) transition.to(rect3,{time=1000,x=250,y=100})
But for the project I am working on, this is obviously not going to work.
Anybody know how to fix this?