Math question: projectile arc movement with startpoint and targetpoint?

After a lot of trial and errors I can’t get a formula for a specific parabola movement right and hope you maybe have some idea how I can implement the following?..

I want to shoot some projectiles in a 2D game from a point A to a point B but not in a line but in an arc using a parabola movement. The kind of movement we know for example from arrows in games like “Kingdom Rush”.

I need the formula for moving a bullet along the parabola arc from a given point A to a given point B with a user defined speed value for the bullet.

The problem I have with this is I can’t get the formula right where this kind of movement is starting in an exact position of a point A and ending in an exact position of a point B.

Any help for this is very welcome!!!

Thank you!

Daniela

You could always play around with the object:setLinearVelocity call to get the parabola motion. You could use:

object:setLinearVelocity(80,-180)

Which would throw your object on an arc.This of course assumes you’re using physics in your app, which may not be the case.
 

I know I’ve been talking up the DMC library lately, and I promise I’m not a shill. However, he has a great trajectory example in there that I think is exactly what you’re looking for:

Mobile Application Development | DMC Lib - Touch Manager

Thank you for your last tip… i will look into it.

BTW: I forgot to mention i want to realize this without the use of physics. My math is a little rusty and I hoped maybe someone here has used a formula for this before and can help.

You could always play around with the object:setLinearVelocity call to get the parabola motion. You could use:

object:setLinearVelocity(80,-180)

Which would throw your object on an arc.This of course assumes you’re using physics in your app, which may not be the case.
 

I know I’ve been talking up the DMC library lately, and I promise I’m not a shill. However, he has a great trajectory example in there that I think is exactly what you’re looking for:

Mobile Application Development | DMC Lib - Touch Manager

Thank you for your last tip… i will look into it.

BTW: I forgot to mention i want to realize this without the use of physics. My math is a little rusty and I hoped maybe someone here has used a formula for this before and can help.