|
-
Nov 29th, 2004, 09:59 AM
#1
Projectile motion [theory]
In my westerngame I did it pretty simple. The gun shoots straight forward, and you can shoot 150m. But a real bullet doesn't shoot like that. Let me take an AG3 for example, since that is the gun I have used the most.
You shoot the bullet out in one height. Then the first 30 meters it is a pretty straight line. Then it will start to go upwards, and after 115m it is 8cm higher then where it started, then after 200m it is at the same height as it started, and then it will slowly go down to the ground.
Now the problem is to adapt this to the game. Because the bullet will move in about 790m/s. And it can last for up to 4000m. If I have calculated right (lets say you have 30frames per sec) then it will move about 26m the first frame. So now is the problem. What would be the best way to do this:
1: Check where the bullet was last frame, and make a line from the last point, to the point it is NOW, and check to see if it penetrated through something.
2: First check if it passed through a surface (xy/yz) where someone/something is, and if it did then calculate the distance, and then check in a look up table for the height of the bullet at that point, and check if it did hit the polygon/mesh.
3: Any other good solutions?
-
Nov 29th, 2004, 12:49 PM
#2
-
Nov 29th, 2004, 02:46 PM
#3
No it is not because of air resistent....how the hell can a bullet move upwards because of air resistent. If it goes perfectly straight forward, then the air resistent will be 180deg on that, and that will only slow it down, not pull it up.
Well to be honest I have never been 100% why diffrent guns do this. When I first joined the army I thought it was because of the spin the bullet gets in the pipe. But I have later been thinking a bit about that too (why shold it move upwards beacuse of that, why not down or to the side). So I guess it is because the sight is made that way compared to the pipe. Because that way you will get the "straight" firing line to be longer then if it didn't.
PS: An average person in war/combat is getting shot on 200m distance.
-
Nov 29th, 2004, 03:02 PM
#4
PowerPoster
The army NoteMe eh? Good work. I'm joining the recruits soon but only for the reserve...I do not have the attention span to stay focused for a year and a half to join the regulars yet. So the reserve takes me depending on the session every tuesday and saturday or for 21 weeks straight...
Anyway!!
As for the bullet gaining an uplift as in comes out of the barrel.
One would think that could only happen if the bullet was initially fired at maybe an angle like 91...So it takes awhile for it to gain height. But that is not that case.
One would also assume that the bullet comes out so fast that it is nearly uneffected for the first few ms in air by anything.
See, it is the fact it is spinning as it comes out. The shape of the bullet gives it a perfect cut through the air with almost 0 resistance, but there is some...Pretending there is no air resistance then it is simply the fact is it spinning.
My gym teached back in high school used a football as an example to a bullet...Although throwing a football in a frictioness/air resistanceless environment is impossible. He showed us that throwing it practically straight would causes it to gain height near the middle of balls fleight, that effect was only noticed when the ball was in a very fast proffesional spin.
I do not know the numbers or the calculations to prove this. But it is the fact that it HAS to arc somewhere if it is spinning in its own centra-fuse sorta speak.
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
-
Nov 29th, 2004, 03:24 PM
#5
ok just been looking into this idea and becasue the projectile falls from the moment it laves the barrel the actuall gunsight takes this into account so when you aim for a target it willa ctually shoot just above that to compensate for the fall... thats the only reason i can think of...
-
Nov 29th, 2004, 03:28 PM
#6
When I was 18, I was about to join the Airforce. At that time though, I met a recruiter and everything and unfortunately I only had a GED, which would cause them to put me anywhere they would want me to rather than me having a choice of what part of the Airforce I would want to go. Not to mention it would not allow me much time to live the life I'm having now. The majority of my time would be for them rather than myself. So I decided not to go.
-
Nov 30th, 2004, 10:24 AM
#7
Originally posted by Pino
ok just been looking into this idea and becasue the projectile falls from the moment it laves the barrel the actuall gunsight takes this into account so when you aim for a target it willa ctually shoot just above that to compensate for the fall... thats the only reason i can think of...
Yeah, that was what I tried to say too as my second explenation....
-
Nov 30th, 2004, 10:25 AM
#8
How did this thread end up about talking about military....now back on topic..
Last edited by NoteMe; Dec 1st, 2004 at 11:57 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|