I’m trying to rotate object around another object like earth rotates around the sun.
I was wandering if it is possible to do that in corona sdk? And if yes please give some ideas how to do that. here is my code Thanks in advance.
local cer01 = display.newCircle(50,50,50,50)
cer01.x = 200; cer01.y = 400
local cer02 = display.newCircle(25,25,25,25)
cer02.x = 100; cer02.y = 300
local function animate( event )
–cer02(small circle) orbit rotation around cer01(big circle) like earth rotates around the sun.
end
Runtime:addEventListener(“enterFrame”, animate);