A consideration on physics and projectile trajectories.
Posted: Tue Dec 12, 2006 1:29 am
Warning:This post, and presumably the following topic, will be pretty math and other stuff heavy. That being said...
First of, this topic is going to have most to do with weapons and projectiles, just so you know.
Let me start of with this question: What path do bullets travel in?
A line? As represented by the Battlefront series? Wrong.
Bullets, and any other projectile of the sort (in a perfect mathmatical world such as a computer simulation:roll:) will travel in a parabola, or the shape a quadratic function makes when graphed:
Figure A:A parabola

As we realize, the path a bullet makes would be much more stretched out, best represented by the equation (in the standard form of f(x)=ax^2+bx+c) is -16t^2+vt+h where -16 represents the acceleration of gravity, t represents time, v represents velocity and h represents initial height. Because the starting height will alway's be varying, due to the changing location of the fireing point, the values we don't know are velocity and time. Because the time is always changeing, and the x value has to be a variable for the equation to graph, we only need velocity, which is supplied by the creator.
Now, I know all the math part, but what I need help with is integrating it into the game. I know that:
-grenade ordinance classes have user adjusted values for
-gavity effect
-velocity
I also know that:
-ordinance classes (namely bolt and bullet) have user adjusted values (bleh, I feel an acryonym coming on, UAVs?) for:
-Velocity
-but not gravity
We all know that when you throw a grenade, it arcs in the classical parabola style. What I want to know is if it is possible to include this same style of physics into standard projectiles, either by including the same gravity lines in the projectile's ODF, or by classifying projectiles as grenades.
My second question is about scale:
the rate of acceleration of a body in a free fall on the planet earth (i.e., the rate of gravity) is 16 feet per second per second. (whatever meters per second per second for all you metric folk, sorry, I think it's 9.8 but I'm not sure)
We can tell that the grenades follow a fairly realistic trajectory, but in the ODF it does not, definently does not, say 16 as the gravity value. I'm pretty sure it says 1. So does that mean that 2 would give twice the strength of earth gravity? or is this some new measurement I'm not informed of?
Anyway, third question, (ok ok, this is the last one):
I haven't done any research into this, but would it be possible to include wind effect, to kind of push the bullet or such.
Anyway, these are mostly theoretical, so I'll just wait for someone like Psychofred to come along and tell me it's not possible, but it seems like it should be, so just disscuse you're thoughts.
This post brought to you by sophmore math, research in physics, and a severly underused imagination. Thank you for your time.
First of, this topic is going to have most to do with weapons and projectiles, just so you know.
Let me start of with this question: What path do bullets travel in?
A line? As represented by the Battlefront series? Wrong.
Bullets, and any other projectile of the sort (in a perfect mathmatical world such as a computer simulation:roll:) will travel in a parabola, or the shape a quadratic function makes when graphed:
Figure A:A parabola
As we realize, the path a bullet makes would be much more stretched out, best represented by the equation (in the standard form of f(x)=ax^2+bx+c) is -16t^2+vt+h where -16 represents the acceleration of gravity, t represents time, v represents velocity and h represents initial height. Because the starting height will alway's be varying, due to the changing location of the fireing point, the values we don't know are velocity and time. Because the time is always changeing, and the x value has to be a variable for the equation to graph, we only need velocity, which is supplied by the creator.
Now, I know all the math part, but what I need help with is integrating it into the game. I know that:
-grenade ordinance classes have user adjusted values for
-gavity effect
-velocity
I also know that:
-ordinance classes (namely bolt and bullet) have user adjusted values (bleh, I feel an acryonym coming on, UAVs?) for:
-Velocity
-but not gravity
We all know that when you throw a grenade, it arcs in the classical parabola style. What I want to know is if it is possible to include this same style of physics into standard projectiles, either by including the same gravity lines in the projectile's ODF, or by classifying projectiles as grenades.
My second question is about scale:
the rate of acceleration of a body in a free fall on the planet earth (i.e., the rate of gravity) is 16 feet per second per second. (whatever meters per second per second for all you metric folk, sorry, I think it's 9.8 but I'm not sure)
We can tell that the grenades follow a fairly realistic trajectory, but in the ODF it does not, definently does not, say 16 as the gravity value. I'm pretty sure it says 1. So does that mean that 2 would give twice the strength of earth gravity? or is this some new measurement I'm not informed of?
Anyway, third question, (ok ok, this is the last one):
I haven't done any research into this, but would it be possible to include wind effect, to kind of push the bullet or such.
Anyway, these are mostly theoretical, so I'll just wait for someone like Psychofred to come along and tell me it's not possible, but it seems like it should be, so just disscuse you're thoughts.
This post brought to you by sophmore math, research in physics, and a severly underused imagination. Thank you for your time.