Arc Animator / Draw Bug



I use the Arc function in combination with Animator to make a sprite follow the path. At the same time I draw this path to see if the sprite follows the path correctly.

Here is a working code snippet:

import "CoreLibs/graphics"
import "CoreLibs/animator"
import "CoreLibs/sprites"
import "CoreLibs/timer"

local pd <const> = playdate
local gfx <const> =
local geo = pd.geometry
local ani = gfx.animator

local mapWidth = pd.display.getWidth()
local mapHeight = pd.display.getHeight()

local cornerRadius = 40
local p =, mapHeight/2)
local direction = true
local drawPath = { - cornerRadius, p.y + cornerRadius, cornerRadius, 0, 90, direction),

local pathDuration = {10000}
local easings = {pd.easingFunctions.linear}
local newLvlAnimator =, drawPath, easings, 0)

local sprite =, 20, gfx.kColorBlack))
sprite:moveTo(100, 100)
sprite:setAnimator(newLvlAnimator, false, false)
function sprite:update()
    local x, y = newLvlAnimator:currentValue():unpack()

function pd.update()



In my test, an arc with Animator and Draw works as intended. A problem, however, is a scenario when the arc runs counterclockwise. To test this you need to change direction to direction = false. The path is drawn correctly, but the animator runs wrong. The sprite then moves inverted.

Proper execution of Animator and Draw would be if counterclockwise/clockwise always refers to the specified arc segment. If I have a semicircle with Arc startValue: 0 and endValue:180, the specification of clockwise should only ever refer to how the animator should move clockwise or counterclockwise in this arc segment. Or am I misinterpreting something?

I'm using the latest LUA PlaydateSDK on Mac. Please let me know if this is an error and how I can fix it quickly.

This has been reported a few times. Not sure when the fix will be released.



Thanks for the quick reply.
The process works with the linked fix, but the duration is not correct. I'll have to wait for a fix.