Hi guys, how to write the code in lua for the sprite so he can jump like curve?
This is my code and I want to jump the object like curve.
local function objectJump(event) if event.phase == "began" then object:applyLinearImpulse(5 \* math.sin(2), -100 \* math.sin(2), object.x, object.y) elseif event.phase == "ended" then object:setLinearVelocity(5 \* math.sin(2), -100 \* math.sin(2)) end end