1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Bullet Trajectory?

Discussion in 'General Infiltration Discussion' started by -Freshmeat, Dec 11, 2003.

  1. -Freshmeat

    -Freshmeat Eternally noob

    Joined:
    Dec 4, 2003
    Messages:
    207
    Likes Received:
    0
    Just out of curiosity: What model does the bullet drop-off follow? Line, parabolic, distorted parabolic or something else?

    -Freshmeat
     
  2. Demosthanese

    Demosthanese .

    Joined:
    Apr 11, 2002
    Messages:
    794
    Likes Received:
    0
    The game's gravity pulls the bullet downward, so I'd imagine it is parabolic.
     
  3. yurch

    yurch Swinging the clue-by-four

    Joined:
    May 21, 2001
    Messages:
    5,781
    Likes Received:
    0
    The bullet is also dramatically deaccelerated by air resistance.
     
  4. -Freshmeat

    -Freshmeat Eternally noob

    Joined:
    Dec 4, 2003
    Messages:
    207
    Likes Received:
    0
    Thanks for the answer.

    I am deeply impressed.

    Honestly, I thought that the sheer amount of calculations for this kind of realism would kill off any processor, esp. with lots of full-auto fire.

    Demosthanese, are you implying that the game uses a non-analytic approach? Or is it more along

    y=-a*t^2 (gravity)
    x= b*ln t (resistance)

    For a fast approximation?

    -Freshmeat
     
  5. Demosthanese

    Demosthanese .

    Joined:
    Apr 11, 2002
    Messages:
    794
    Likes Received:
    0
    The resistance is something the team has little control over, as it is a product
    of the level in the variable of terminal velocity. Any object going faster than
    what the level assigns as terminal velocity is slown down gradually (apparently
    why the 40mms don't behave properly). Gravity affects the bullets in the
    same way it affects the player or a flak shell in Vanilla UT.

    I doubt that it uses the distance formula. I'd imagine that every unit of time,
    the game subtracts or adds to the velocity of the pawn, and the position is
    altered based on the speed.
     
  6. Meplat

    Meplat Chock full-o-useless information

    Joined:
    Dec 7, 2003
    Messages:
    482
    Likes Received:
    0
    Want another way to see it?

    "Slow Bullets" and the recent "all tracer" mute. Then go to the range.

    Meplat-
     
  7. yurch

    yurch Swinging the clue-by-four

    Joined:
    May 21, 2001
    Messages:
    5,781
    Likes Received:
    0
    Wrong and wrong. (40mm's are affected by the bBounce variable and will not display that behavior if it is set to false) :D

    The ballistics are using a minor variation of the RAv2 ballistics, which work as follows:

    Air resistance acceleration = negative constant per bullet * velocity * (another per bullet resistance constant ^ distance) * velocity

    This is recalculated basically every .02 of a second. It is basically a changing air resistance based on distance and velocity, which models an approximation of the bullet flight pattern (speed, distance, ToF) that I have calculated beforehand. Acceleration decreases as the bullet slows down, and the rest of the calculation of the bullet (velocity, position) is left to the MUCH faster engine native code.

    It is quite accurate and velocity is even added back to correct the small amounts of error that occur between the .02 second interval. Air resistance has a massive effect on ballistics (approximately half a 5.56's energy is lost in the first 200m) and this models it quite well.

    On top of this manual gravity acceleration is added, not UT's gravity. Only disadvantage of this is that it will not be affected by lowgrav areas or mutators.

    The code is executed seperately on client and server, meaning no information needed to be sent between them during the flight, only the initial characteristics. Like always, server has final say in case of a discrepancy.
     
    Last edited: Dec 11, 2003
  8. -Freshmeat

    -Freshmeat Eternally noob

    Joined:
    Dec 4, 2003
    Messages:
    207
    Likes Received:
    0
    Thank you for the information. I think it is nice to know that the bullet that kills you has done so according to proper physics ;)

    -Freshmeat
     
  9. Alborda

    Alborda Beta Tester for his own life

    Joined:
    Sep 25, 2001
    Messages:
    79
    Likes Received:
    0
    Are this ballistics (like those in RA) on 2.9? I tried the robar on the 500 long shooting range and it seems that the bullet lands where the crosshair is (more or less)
     
    Last edited: Dec 12, 2003
  10. sublime

    sublime Cynic

    Joined:
    Aug 1, 2000
    Messages:
    732
    Likes Received:
    0
    That's because the robar is zeroed at 500m (or close to it believe, am at work and can't check). ;)

    Shoot at at 100m and see if it's high. Shoot it at 700m and see if it's low.
     
  11. gal-z

    gal-z New Member

    Joined:
    May 20, 2003
    Messages:
    420
    Likes Received:
    0
    Hmm... So what's the robar's max height and at what range?
    And at what other range except 500m does it hit with 0 offset? As in M4A1 zeroes to 250m hits exactly where u aim at 250m AND somewhere around 45-50m (don't remember, I think it's 48m).
     
  12. -Freshmeat

    -Freshmeat Eternally noob

    Joined:
    Dec 4, 2003
    Messages:
    207
    Likes Received:
    0
    I think only testing at the shooting range will sort that question out. Make notes on the average offset at all targets from 15 to 500 m, using screenshots for measuring. Use that for a graphical analysis of the trajectory. My guess is that the number is not hardcoded anywhere, and unless we get the exact formulae used for the calculation by the engine (including the error correction Yurch mentions), graphical analysis is the only wayy to go. And it will produce quite reasonable results if you use the average of, say 25 shots at each range for determining the offset.

    The faster method would be to see between what ranges the offset goes from negative, and then presume that the flight path was linear between those two ranges. I guess the result produced from that would be quite close to the real number, and that could be worked out in a couple of hours or so. If you have no clue what I am taking about, I would be willing to do the measuring sometime next month (but not the shooting. You will have to do that for yourself and mail me screenshots of the targets).

    -Freshmeat
     

Share This Page