How to make a sprite jumps with curve?

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

Hi @jumoun,

Well, if you want your character to jump exactly matching a parabolic curve, that could be challenging because there are many factors which affect the physical behavior of an object when you apply force/impulse to it: the gravity, the mass of the object, and more.

If you need to accomplish this, I can probably dig up some 3rd-party tutorials on it. I’m pretty sure that somebody solved this in the past, making a physical object exactly follow a predicted parabolic curve path.

Brent

Hi @jumoun,

Well, if you want your character to jump exactly matching a parabolic curve, that could be challenging because there are many factors which affect the physical behavior of an object when you apply force/impulse to it: the gravity, the mass of the object, and more.

If you need to accomplish this, I can probably dig up some 3rd-party tutorials on it. I’m pretty sure that somebody solved this in the past, making a physical object exactly follow a predicted parabolic curve path.

Brent