Projectile trajectory, ideas and theories

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Frosty289

    #1

    Projectile trajectory, ideas and theories

    SO! I'm at work creating a realism mod, and have been working hardest on the projectiles. Now we all know BF2 can't be the most realistic game out there for a number of reasons, but we can try as hard as we can, right?

    Now lets take a look at the most important aspect of the small arms you're using, the projectile. Now we know how to add a gravity modifier to the projectile, so it drops over a long, long distance, but according to our preset 'velocity', the projectile will be moving the same speed over the course of its lifetime. This means, it won't drop like it should, the weight of the projectile would bring it down faster the slower the projectile went, correct? Well i'm working on ways to do this. I would assume 1g of gravity in BF2 would be a gravity modifier of 1.5, though i'm not completely sure (this is the gravity modifier vehicles use)

    proper projectile flight can greatly impact gameplay, especially on the use of sniper weapons and long range rifles, so here's some code I figured I would try out, and i'd like to hear your theories and ideas to go along with this, this is the projectile template of an Ak-47 rifle

    Keep note, this is the 'insurgent' Ak-47, so it's not like the original, well kept Chinese type-56, I wrote notes in the tweak to explain stuff at the time of coding.

    ObjectTemplate.projectileTemplate insurg_ak47_Projectile
    rem ---poor boor, not oiled, or lubed, poorly cleaned = lower velocity
    ObjectTemplate.velocity 690
    ObjectTemplate.itemIndex 3
    ObjectTemplate.delayToUse 1.2
    Thats the basic, the velocity of the bullet, the real velocity of the round should be 710, but as I wrote in my rem tags that is why it's lower. According to this, the projectile will move at a constant 690 meters per second

    Now this is where you can put stuff in, but will any of this work?

    rem ---123gr(roughly)FMJ 7.62x39 round, 8 grams, low quality, steel core
    ObjectTemplate.mass 0.5
    ObjectTemplate.drag 1
    ObjectTemplate.floaterMod 0
    ObjectTemplate.GravityModifier 1.5
    ObjectTemplate.hasMobilePhysics 1
    ObjectTemplate.hasCollisionPhysics 1
    ObjectTemplate.physicsType Point
    ObjectTemplate.material 38
    rem -------------------------------------
    So technically, due to the drag of the bullet, and the mass, and the gravity modifier, the further it goes, the more it will slow down (due to drag), and because of the mass and gravity modifier, it will fall. Correct? I'm not sure, i'd like some quality feedback
  • GlobalFear

    #2
    Re: Projectile trajectory, ideas and theories

    Gravity modifiers won't have any effect. You need a meshed projectile like the m203 grenades. Objects at 700 fps = **** loads of lag.
    Already tried that one.

    Forgot to note: Lowering velocity will effect drop. Set a tracer interval of 1, remove all recoil, and experiment. It also effects the amount you need to lead a target. This has a much greater effect on gameplay.

    Comment

    • Frosty289

      #3
      Re: Projectile trajectory, ideas and theories

      Actually it works, I made a pretty ****ty video (I don't have proper video software), but it works really well. I made all of the rounds tracers and they do fall a good amount, with a drag of 0.5, a mass of 0.009xxxx (other random numbers that I got when calculated), and gravity modifier of 1.5. I will try adding more drag to see if that drops the bullet even lower, if it does, then you can successfully say that you can slow a bullet down over time.

      Actually it works, I made a pretty ****ty video (I don't have proper video software), but it works really well. I made all of the rounds tracers and they do fall a good amount, with a drag of 0.5, a mass of 0.009xxxx (other random numbers that I got when calculated), and gravity modifier of 1.5. I will try adding more drag to see if that drops the bullet even lower, if it does, then you can successfully say that you can slow a bullet down over time.

      Comment

      • GlobalFear

        #4
        Re: Projectile trajectory, ideas and theories

        Increase the gravity modifier a **** load and see what happens. On the last POC I did with gravity modifiers + projectiles it didn't work.

        Comment

        • Frosty289

          #5
          Re: Projectile trajectory, ideas and theories

          actually I want to tamper with the weight to see if that has any bearing on flight. If it does that means you can apply the same basic principles. Once you figure exactly what the drop is on a Dragunov at 500 meters, then replicate it via changing parameters in BF2, then all you should need to apply to any other weapon projectile is the projectile weight, and physics will take care of the rest.

          Comment

          • GlobalFear

            #6
            Re: Projectile trajectory, ideas and theories

            Thats great until you realize that there is more to it than mass. Hey, you want realism. :p

            Comment

            • Frosty289

              #7
              Re: Projectile trajectory, ideas and theories

              yeah it also doesn't work for some reason, I made the projectile 12 kilos and it flew the same. The only thing it's dependent on for flight is the gravity modifier. Not sure how to remedy this

              Comment

              • GlobalFear

                #8
                Re: Projectile trajectory, ideas and theories

                Atleast the gravity modifer works. :p

                Comment

                • Frosty289

                  #9
                  Re: Projectile trajectory, ideas and theories

                  blah, but it moves the same speed throughout its life, so it falls at the same rate the whole time.

                  Comment

                  • e-Gor

                    #10
                    Re: Projectile trajectory, ideas and theories

                    Mass won't affect how fast it drops at all. Try learning basic physics first :p

                    BF2 as is has bullet drop in, without needing to change any files. Try setting projectile speed to 1m/s, and you'll see it hit the floor just in front of you.

                    I would assume 1g of gravity in BF2 would be a gravity modifier of 1.5
                    Gravitymodifier is a multiplier for the amount the object is affected by gravity. So 1 is normal, assuming physics.gravity is set normally. Most bf2 vehicles have 1.5, to make them stick to the ground more at high speeds. Give your bullets a high gravitymodifier, and they should accellerate downwards faster.

                    And if you want realism... with almost all weapons used today, bullet drop is not noticable at any range you'd engage at in bf2. Vanilla has it about right. On the whole it uses relatively realistic (if rather simplified at times) physics. Bullets accelerate downwards at 1g (unless you play with gravitymodifiers) so if you set the projectile speed to a realistic value, the bullet will have a realistic drop.

                    Comment

                    • Frosty289

                      #11
                      Re: Projectile trajectory, ideas and theories

                      And if you want realism... with almost all weapons used today, bullet drop is not noticable at any range you'd engage at in bf2. Vanilla has it about right. On the whole it uses relatively realistic (if rather simplified at times) physics. Bullets accelerate downwards at 1g (unless you play with gravitymodifiers) so if you set the projectile speed to a realistic value, the bullet will have a realistic drop.
                      I disagree, the bullet drop in BF2, if left with a 'realistic velocity' and gravity modifier, will not come close to how it should really be. For example, you'd think the round wouldn't drop much, but look at the graph of the 7.62x54mmR round, which is the same type of round as the 7N1 sniper ammunition used in the Dragunov. At 100 yards (91 meters) at bore level, the round has dropped nearly 2.5", and at 200 yards, it's dropped nearly 1'. Considering that the round weight and drag had no bearing, as in BF2, then the round would have dropped to approx. 5" at 200 yards. Though the rifle in the test setup was an M44, it shoots only 10mps slower then the SVD.

                      Comment

                      • e-Gor

                        #12
                        Re: Projectile trajectory, ideas and theories

                        Originally posted by Frosty289
                        then the round would have dropped to approx. 5" at 200 yards.
                        Exactly. You're not gonna get engagements at much further than that in BF2, even with snipers. And at that range the deviation settings on a sniper have a much larger effect than that 5" of drop.

                        Comment

                        • Frosty289

                          #13
                          Re: Projectile trajectory, ideas and theories

                          You usually snipe well beyond 200 yards, and a drop of that magnitude will definately be noticeable. Like on Kubra dam, I was just curious. The farthest, logical target you would shoot at from the top of the dam is nearly 500 meters - which would be quite a fun challenge to hit the sniper on top of the crane. Also this would let you be able to use the real scope overlays ect. on the weapons, rather then fabricated ones. Even though you wouldn't engage a soldier at that distance with a rifle, it's still nice to know you've got the most realistic ballistics out there.

                          Comment

                          Working...