Update 0.2.4D: More updates to the ballistics


Nothing too crazy in this devblog, I had just implemented a system so that bullets will start to point downwards as they start to fall from the air. This should be better (and more realistic) than the bullet falling while always pointing towards the firing forward (essentially the same direction since it left the barrel).

I also changed the bullet's speed variable to a Vector3 so that way wind and other things can affect it. I am still working on inheriting velocity but that should be coming soon. I also changed the formulas to fit the ballistic trajectory to be more like real life. In the previous version I used the formula:

P = Sp + (Sf * S * T), G = VD * (GA * D) * T * T;

P = point

G = Gravity Vector

Sp = Start position

Sf = start forward

S = speed

T = time;

VD = Vector3.down (negative y axis)

D = drag coefficient


Now I replaced it with :

V += Rg *T;

P += V * T;


V = velocity;

Rg = (gravitation acceleration * drag coefficient) - gravity;

T = time;


This changes the ballistic arc quite a bit as it simulates the bullet losing energy over time, this also changed the way the whole flight path was too. Before the bullet traveled in a straight line until its velocity was 1.5 times lower than the muzzle velocity, then it would start dropping. This made the guns more accurate at close ranges but it was unrealistic. This new formula has the bullet start to drop the second it leaves the barrel. So over time, it falls more and more. This didn't really happen in the previous iteration as well because the bullet didnt rotate downwards as it started to fall, and the previous formula was off of the forward of the bullet which was untouched by the ballistic arc.

Now I will start working on the effects of rifling, coriolis effect, wind, and gyroscopic drift. This will all be added soon, I will also try to implement the bullet losing RPMs of rotation during its flight so that the farther away, the less accurate the bullet becomes as it starts to lose its gyroscopic stabilization and starts to wobble.

Bullet spinning will not affect penetration in anyway, I have no interest in figuring it out and as a player just trying to penetrate a vehicle is frustrating enough, I don't want players to get upset because the bullet lost too much spin or had enough to the point to where it affected the bullet's penetration capabilities. 

I am also working on improving the bullet hit detection and spalling to make it as consistent as I possibly can.

Get Unity Tank Simulator

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.