Arrow Bow Physics - Help!

Hi Guys!
Well, after the almost-Success with my PacMan :stuck_out_tongue: , i decided that now, for my college project, i will make a archer 2D game. Something like Sonic.

Well, since i have until september of 2014, i think i can learn it :stuck_out_tongue:

Anyway, im researching about how the arrow travels in 2Dā€¦ Im unsure if i should use a X^2 Equation or calculate the Epg + Epe ā€¦
Im no Physics pro, thought i study a lot, and im kinda dissapointed with myself for not knowing thatā€¦ But i thought i could post here and clear things up :stuck_out_tongue:

Would you guys give me some tips :stuck_out_tongue: ???

tyy

Btw, i know calculus I, if that helps.

Search of Projectile Motion will give you all the formulas.

Seems alright so far, gives the equations, what some of the variables are and does examples.

If you asked like 6 months ago, I would of been able to give you the formulas soo much easier with a explanation, I learnt projectile motion in physics last year.

EDIT: Projectiles travel in a parabola.

Just Downloaded, Fun App. But it doesnt give me the Formulas :stuck_out_tongue:
I will research with that in mind
TY!!!

Parabolic move:


maxHeight = ((startVelocity ^ 2) * (Math.sin(theta)) ^ 2) / 2 * gravity
//measure x and y based on time (delta)
x = startVelocity * Math.cos(theta) * time
y = startVelocity * Math.sin(theta) * time - (gravity * time ^ 2) / 2

Ok, The time should be pre-calculated ? I mean, the time depends on the velocity, right?
And the YV ( max height) should be used so the arrow can travel to the middle going up and then starts going down?

You should already know your gravity (in pixel/s) and theta. If the point of where the arrow being shot is fixed, then you will have maxHeight in mind thus you get the startVelocity.

Time is amount of second passed since the arrow start moving. You need to calc the x,y for render. If you canā€™t find right value for startVelocity, try by trial.

This I programmed this in processing (it is like something embedded into java with libraries) http://www.openprocessing.org/sketch/19867 but it should be understandable.
There is button for source code.

Why do you need a formula with angles to make a parabola?

Use angles once when the projectile is fired to set the intial velocity, then increase the downward velocity by gravity each update.

If its 2D, its easy. You should have a direction vector(which is just your velocity normalized), so get the angle of that, and then subtract from your Y velocity to make a parabolic motion.

In a vacuum. Arrows follow flatter paths.

Not neccessarily a vacuum. Any area not effected by gravity will do. It just happens that matter tends to exist around objects that have strong gravity.

Now your getting further away.

Projectiles move in a perfect parabola due to the gravity, if gravity did not exist, the projectile would travel in a straight line in the angle you shoot.

Gravity will push down on the projectile, causing it to move in a parabola.

and to pjt33, not sure what a flatter path is, quick google search didnā€™t return me anything useful, due to air resistance, it will not be perfect as the horizontal component will slow down, causing the flight path to not follow a parabola that is worked out without the the effect of air resistance.

Except lasers.

In the simplest model, air resistance directly opposes direction of motion, so it affects the vertical component too. I once did some work on finding suitable air resistance parameters to fit known shell ranges and predict ranges for other shells for a historical warfare game, but I donā€™t remember the values which I came up with.

For arrows the gyroscopic effect is likely to be quite significant in preventing the arrow from curving away from the straight line it would naturally follow. (Of course, itā€™s never that simple: thereā€™s also precession to take into accountā€¦)

ā€œThe Mathematics of Projectiles in Sportā€ by Neville de Mestre might be worth getting hold of for people who are interested in realistic simulations.

PS HeroesGraveDev, stop digging.

I think for an arrow, the gyroscopic effect can be simulated fairly accurately by using an augmented version of gravity - say 7 instead of 9.81 (not that I tend to use 9.81 anyway (not using metres for the scene and seconds for the delta and all) but you get the point).

Lasers are light which is still effected by gravity (why black holes are black), so they do still follow a parabolic path, its just they leave the noticeable effects of Earthā€™s gravity before it can have any noticeable effect on it. See monkey and hunter.

This I programmed this in processing (it is like something embedded into java with libraries) http://www.openprocessing.org/sketch/19867 but it should be understandable.
There is button for source code.

Why do you need a formula with angles to make a parabola?

Use angles once when the projectile is fired to set the intial velocity, then increase the downward velocity by gravity each update.

If its 2D, its easy. You should have a direction vector(which is just your velocity normalized), so get the angle of that, and then subtract from your Y velocity to make a parabolic motion.

In a vacuum. Arrows follow flatter paths.

Not neccessarily a vacuum. Any area not effected by gravity will do. It just happens that matter tends to exist around objects that have strong gravity.