オブジェクトを回転方向に移動する正しい方法は何ですか?
今私は持っています:
local ang = body:getAngle() * 180 / 3.14 /// get body's rotation in degrees
local x, y = body:getPosition(); /// get current position
ang = ang%360
x = x + math.sin(ang)
y = y + math.cos(ang)
print(ang)
body:setPosition(x,y)
しかし、体は非常に奇妙な動きをしています。私が間違っていることはありますか?
ありがとう