Bullet Deceleration

Making or wanting help making your own asset? Check in here
M42 Zwilling
Retired PR Developer
Posts: 613
Joined: 2012-06-10 11:27

Bullet Deceleration

Post by M42 Zwilling »

Have you devs ever played the Wookie Sniper Mod? I ran across a rather interesting bit of coding in its projectiles.

They used ObjectTemplate.mass and ObjectTemplate.drag to achieve bullet deceleration.

Here a picture demostrating its effectiveness. I added a red smoke trail to the projectile.

Image

For testing purposes, I fired the projectile at a muzzle velocity of 100 m/s. Here are the relevant settings for the projectile I used:

Code: Select all

ObjectTemplate.gravityModifier 0.8
ObjectTemplate.mass 1
ObjectTemplate.drag 50
This should make ballistics a bit more interesting. :)
Rudd
Retired PR Developer
Posts: 21225
Joined: 2007-08-15 14:32

Re: Bullet Deceleration

Post by Rudd »

The issue is that tracers and non-tracers will behave significantly differently afaik. I do not know if the wookie mod overcame this or not.
Image
SShadowFox
Posts: 1123
Joined: 2012-01-25 21:35

Re: Bullet Deceleration

Post by SShadowFox »

In Wookie's previous version there was a perfectly working tracer with the bullet drop.

Also, can't the DEVs get the Tank shell effect, reduce, and change the color to red and green, then put it as the tracer effect and see if it works with the bullet drop.

Also Mosquill have a video that shows ballistic effects to snipers and there is tracer on it, the tracer in that video works perfectly.

Last edited by SShadowFox on 2012-08-31 22:37, edited 1 time in total.
Image
[R-DEV]Spec:The suggestion is not accepted, I merely wanted to comment.

Shame doesn't work on me, Nor on men of my caliber.
Rudd
Retired PR Developer
Posts: 21225
Joined: 2007-08-15 14:32

Re: Bullet Deceleration

Post by Rudd »

Also Mosquill have a video that shows ballistic effects to snipers and there is tracer on it, the tracer in that video works perfectly.
this was done in 2142 iirc
In Wookie's previous version there was a perfectly working tracer with the bullet drop.
Didn't it have only tracer weapons and no-tracer weapons?
Image
SShadowFox
Posts: 1123
Joined: 2012-01-25 21:35

Re: Bullet Deceleration

Post by SShadowFox »

IIRC, there was only tracer weapons (even pistols had tracers back then), but it was removed.
Image
[R-DEV]Spec:The suggestion is not accepted, I merely wanted to comment.

Shame doesn't work on me, Nor on men of my caliber.
M42 Zwilling
Retired PR Developer
Posts: 613
Joined: 2012-06-10 11:27

Re: Bullet Deceleration

Post by M42 Zwilling »

Yeah, there's is a difference of about a foot at 50 meters with the current settings. The difference will be much less if implemented, as the bullet will be much faster and there will probably be less deceleration. In any case, the difference in bullet drop was present even without deceleration.
Last edited by M42 Zwilling on 2012-09-01 11:11, edited 1 time in total.
Reason: typo
K_Rivers
Posts: 946
Joined: 2011-01-14 14:05

Post by K_Rivers »

Try testing your theory


Cheers Rivers
Image

Rhino: "says the noob who couldn't hold still even thou Jafar wanted a threesome"
Alek-say
Posts: 349
Joined: 2010-11-27 20:17

Re: Bullet Deceleration

Post by Alek-say »

About ballistics:
Image
Image
M42 Zwilling
Retired PR Developer
Posts: 613
Joined: 2012-06-10 11:27

Re: Bullet Deceleration

Post by M42 Zwilling »

K_Rivers wrote:Try testing your theory


Cheers Rivers
Not sure if I understand what you mean, but if you mean a smaller difference with more realistic settings, then yes, there is a smaller difference. I just tested it at a range of 100 meters with a gun having zero recoil and zero deviation. The projectile used PR's 5.56x45 gravity modifier of 0.3, a mass of 1, and a drag of 25 (not sure what realistic drag would be). The bullet holes for the tracers and non-tracers were directly above each other, with about an inch or two difference between the points of impact.

EDIT

Uh oh. It seems bots almost never use weapons with projectiles that have mass and/or drag. That could be a deal-breaker. I'll test further.
Last edited by M42 Zwilling on 2012-09-01 12:31, edited 1 time in total.
Pvt.LHeureux
Posts: 4796
Joined: 2009-04-03 15:45

Re: Bullet Deceleration

Post by Pvt.LHeureux »

PR doesn't really give a **** about bots lol
Image

Chuva_RD : You want to remove bugged thing but dont tell how to fill formed void.
BroCop
Posts: 4155
Joined: 2008-03-08 12:28

Re: Bullet Deceleration

Post by BroCop »

Which is why they have developers working specifically on bots...
Image
Pvt.LHeureux
Posts: 4796
Joined: 2009-04-03 15:45

Re: Bullet Deceleration

Post by Pvt.LHeureux »

If this can work online, then the bots will see their own modified weapons on coop mod. like the bot only choppers.
Image

Chuva_RD : You want to remove bugged thing but dont tell how to fill formed void.
M42 Zwilling
Retired PR Developer
Posts: 613
Joined: 2012-06-10 11:27

Re: Bullet Deceleration

Post by M42 Zwilling »

Fortunately, I got bots to shoot projectiles with drag. All I did was base my coding on the TOW from vanilla, which already had drag. Now I just have to figure out why it didn't work before.
Arnoldio
Posts: 4210
Joined: 2008-07-22 15:04

Re: Bullet Deceleration

Post by Arnoldio »

Thing is, DEVs have tried to implement some ballistics and tracer rounds act differently to normal rounds, so every third round would have a different trajectory. While tracers do have slight difference, it isnt nearly as mucha s the team is experiencing.

If there is a soludion, it would be more than welcome i believe.
Image


Orgies beat masturbation hands down. - Staker
M42 Zwilling
Retired PR Developer
Posts: 613
Joined: 2012-06-10 11:27

Re: Bullet Deceleration

Post by M42 Zwilling »

Well, I did some more testing. I switched testing to vanilla just to make sure that the lack of firing on the part of the bots wasn't somehow connected to an issue in my personal mod. I added the same drag to all the handheld firearm projectiles used in Strike at Karkand and tested it. Bots had no trouble using some weapons like the AK-101 and M16A2, but didn't fire a shot with others like the M249. I am completely stumped as to why they do this.

I also tried adding all the anti-gravity commands I could think of to tracers, to no avail.

I had another idea, though. I added a ForceObject to the SA-7 'Grail' and found that it also achieved deceleration. A delay can be added to the ForceObject so the rocket will begin to decelerate after the engine runs out fuel. I also witnessed a bot attempt to down a Huey with one. Unfortunately, this method probably won't work with the bullets used by assault rifles, SMGs, pistols, etc., because they have no geometry.

This method brings to mind one more possibility for fixing the tracers. Adding a force object to the tracer geometry might successfully reduce the bullet drop for tracers. I have a feeling though that this won't work, but I'll give it a try anyway.
Pvt.LHeureux
Posts: 4796
Joined: 2009-04-03 15:45

Re: Bullet Deceleration

Post by Pvt.LHeureux »

I still don't get how FH2 managed bullet drop on their tracers then.
Image

Chuva_RD : You want to remove bugged thing but dont tell how to fill formed void.
M42 Zwilling
Retired PR Developer
Posts: 613
Joined: 2012-06-10 11:27

Re: Bullet Deceleration

Post by M42 Zwilling »

Pvt.LHeureux wrote:I still don't get how FH2 managed bullet drop on their tracers then.
It's not that tracers can't have bullet drop. They inexplicably drop faster than non-tracers.
Pvt.LHeureux
Posts: 4796
Joined: 2009-04-03 15:45

Re: Bullet Deceleration

Post by Pvt.LHeureux »

Oh I see.
Image

Chuva_RD : You want to remove bugged thing but dont tell how to fill formed void.
J.F.Leusch69
Retired PR Developer
Posts: 2988
Joined: 2008-04-23 16:37

Re: Bullet Deceleration

Post by J.F.Leusch69 »

interesting thing about the deceleration of rockets...
Post Reply

Return to “PR:BF2 Community Modding”