It works great when the shape is sitting still, but if you uncomment line 42:
Code: Select all
--platform:rotate(rotation*dt,centerX,centerY)
Code: Select all
local dist = math.sqrt(dx^2+dy^2)
if dist - oldDist > .5 then player:move(dx,dy) end
oldDist = dist
So I guess what I'm asking is for some advice on how I should handle moving/rotating platforms like this, without making the character teleport around like a moron!
I put the .love file here, because the board here is saying it's full or something. I apologize in advance for how sloppy and confusing my code probably is, and I'd really appreciate any kind of pointers anyone could give me!
(btw, controls are A/D to move, SPACE to jump, left click to toggle between physics mode and drag-and-drop mode.)