I bought the corona, but I can not finish my project. This is because, in the corona of a problem with the rotation of objects. It is easy to see when you look the rotation of physical objects in the group. This problem has been known a year ago, but so far nothing has been done. Here is an example of normal rotation (no physics) - rotation changes the position of object, but its coordinates are the same. How can I get the “original” coordinates of a rotating object.
[code]
local myRectangle = display.newRect(0, 0, 150, 50)
myRectangle:setFillColor(140, 140, 140)
myRectangle.x = display.contentWidth / 2 +200
myRectangle.y = display.contentHeight / 2
myRectangle.xReference = -200 – makes it rotate in the center of the stage
local RotateIt = function( event )
myRectangle.rotation = myRectangle.rotation + 0.5
print(myRectangle.x)
print(myRectangle.xReference )
print(myRectangle.xOrigin)
– values do not change
end
Runtime:addEventListener( “enterFrame”, RotateIt )
[/code] [import]uid: 99600 topic_id: 27908 reply_id: 327908[/import]