This is the script, local sunX = 0
local sunY = 0
local radius = 0
local speed = 3.46
local startAngle = 0
local startTime = 0
function onCreate()
local dx = my.layout.x - sunX
local dy = my.layout.y - sunY
radius = math.sqrt(dx * dx + dy * dy)
startAngle = math.atan2(dy, dx)
startTime = castle.getTime()
end
function onUpdate(dt)
local elapsed = castle.getTime() - startTime
local angle = startAngle + elapsed * speed
my.layout.x = sunX + radius * math.cos(angle)
my.layout.y = sunY + radius * math.sin(angle)
end
function onMessage(message, triggeringActor)
end