Hello everybody,
I am trying to make few object transition from a display group I created but when I try to add parameters like xScale or rotation it starts to behave really strangely, it doesn’t reach final x y coordinates just ends in some random place.
[lua]local myGroup = display.newGroup()
local rect = display.newRect( 0, 0, 100, 100)
rect.x = 100
rect.y = 100
myGroup:insert( rect )
transition.to (myGroup, {rotation = 180, time=700, x=400, y=400})
local function go(event)
display.remove(rect)
local rect1 = display.newRect( 0, 0, 100, 100)
rect1.x = rect.x
rect1.y = rect.y
rect1:setFillColor( 1, 1, 0.1)
myGroup:insert( rect1 )
return true
end
Runtime:addEventListener( “tap”, go)
[/lua]
Edited: Looks like even x and y final coordinates without adding other parameters is incorrect. Interesting why there is a such behaviour. How it works?