Jump to content
Sign in to follow this  
__d0ct0r__

Does player movement affect bullet velocity?

Recommended Posts

Hello all, I am wondering something. In ArmA 3, is the velocity of the bullet affected by the player's speed. For example, let's say a gun has a muzzle velocity of 800m/s. Therefore, if the player is standing still, every bullet that comes out of the gun will have an initial velocity of 800m/s. However, if the player is moving forward, at for example, 5m/s, would the initial velocity of the bullet be 805m/s? In the real world, this is what would be expected (the velocity of the bullet relative to the rifle/shooter is 800m/s - the muzzle velocity - however since the rifle/shooter is travelling forward at 5m/s, the velocity of the bullet relative to the ground, i.e. the true velocity of the bullet would be 805m/s, in theory if you were travelling backwards at 800m/s and fired a gun with a muzzle velocity of 800m/s, the bullets velocity relative to the earth would be 0). What I am asking is whether this is also the case in ArmA.

Share this post


Link to post
Share on other sites
Posted (edited)

Let us know:

player addEventHandler ["FiredMan", {
	_this spawn {
		params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle"];
		systemchat format ["Player velocity: %1", speed _unit];
      	while {alive _projectile} do {
        	systemchat format ["Bullet velocity: %1", speed _projectile];
          	sleep 0.5;
        };
	};
}];

(untested and written while half asleep so there may be syntax errors)

Edited by stanhope
syntax error

Share this post


Link to post
Share on other sites
1 hour ago, stanhope said:

Let us know:


player addEventHandler ["FiredMan", {
	_this spawn {
		params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle"];
		systemchat format ["Player velocity: %1", speed _unit];
      	while {alive _projectile} do {
        	systemchat format ["Bullet velocity: %1", speed _projectile];
          	sleep 0.5;
        };
	};
}];

(untested and written while half asleep so there may be syntax errors)

I'll give it a shot next time I'm on my PC (sometime tomorrow most likely), thanks for the help!

Share this post


Link to post
Share on other sites

Can confirm it works:  tested with a MX 3GL 40mm projectile:

VEbXVw7.png

  • Like 2
  • Haha 1

Share this post


Link to post
Share on other sites
On 6/22/2021 at 5:35 PM, stanhope said:

Can confirm it works:  tested with a MX 3GL 40mm projectile:

VEbXVw7.png

I also tested it with the rifles, it indeed does work too. Thank you so much for your help!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×