I'm just trying to make polygons alongside a character like their hitbox but I don't know to make that a part of their Sprite so I'm doing it this way I tried first using a rect since I knew they were simpler But it doesn't seem to work Can you guys see any problems with my code
main.lua
import "ANIMATEDIMAGE"
import "LDtk"
import "CoreLibs/timer"
import "CoreLibs/object"
import "CoreLibs/sprites"
import "CoreLibs/graphics"
import "enity"
import "level/level”
local gfx = playdate.graphics
local anim = AnimatedImage
local timer = pd.timer
function playdate.update()
playdate.graphics.clear()
chunk1()
end
level.lua
import "CoreLibs/sprites"
import "CoreLibs/graphics"
pd = playdate
gfx = pd.graphics
pgp =pd.geometry.polygon
rect =pd.geometry.rect
arc =pd.geometry.arc
l = 0
r = 20
d = 400
a = 50
r1 = rect.new(l,r,d,a)
function chunk1()
gfx.drawRect(r1)
print(l , r)
if playdate.buttonIsPressed("a") then
l = l + 100
r = r + 100
end
end