So I want to take a moment to explain to yall how zeroing will work in Weapon Master VR in version 1.1. For all intents and purposes, zeroing in weapon master will work identically to real world zeroing which brings about some issues that I will get into later. First let me explain to you how zeroing works.
For the most part video games either don’t zero correctly or do it kind of half *****. AFAIK, battlefield, pubg, cod and others use one point zeroing only which isn’t how firearms work. It can get confusing, and I do often get confused myself, but let me explain to you how its supposed to be done.
The top image in the above picture is how zeroing actually works and the bottom is how a lot games do it (which is wrong). May seem like a small issue but for VR it becomes I giant problem. By using correct zeroing (the top image) we also have another problem, Hitscan weapons are essentially worthless at range. This is unfortunately true, and something I am not going to attempt to fix. If you are making any modern shooter that involves long range shooting then you need to be using projectiles or a projectile asset to get correct bullet drop. Hitscan is an archaic method and only really viable in corridor shooters or arcade games.
Moving on we need to talk about zero ranges and double zeros. If you want to read an in depth look into zeroing 101 check out this great page https://www.ammoland.com/2014/06/how-to-zero-your-ar-15-rifle/#axzz4pwEXBMwE .
First off a “Double Zero”, also called convergence, is achieved when a gun has such a short initial zero that the bullet actually crosses the line of sight twice. The image below illustrates this.
Popular double zeros are (First Zero/Second Zero)
25/400
36/300
50/200
This double zero means you will be dead on accurate at two different distances as long as you are using correct bullet drop.
Longer zeros, like 100 do not really go over the line of sight so they effectively only have 1 zero.
So what zeroes will we have in weapon master?
Pistols: 25 yard zero
Shotguns: 25 yard zero (note: shotgun trajectory is different than rifle but uses the same logic)
Rifle 1x and Ironsight: 50/200 yard zero
Rifle Acog Fixed: 50/200 yard zero
Rifle Scope Variable: 100, 50/200, 36/300, 25/400 yard zero
For example, with the Tavor AR and the Acog your shot will be dead on at 50 and 200ish yards, 6 inches low at 300 yards, 1.5 inches high at 100 yards, and 1.5 inches low at 25 yards.
So that’s great Brad but it seems super complicated, how will I be able to set up my own zeroes, and how will I get my sight angled correctly?
The answer to that is, for scopes and sights, we will angle the camera or hololense towards the first convergence point (zero point). For iron sights we will have to manually adjust the front or rear sight to get it to align corrently.
So how do we get the angle? Well to do that we will use some geometry.
The formula we will use to get the angle we need is tan(d) = a/b. In order to get a and b we need to get calculate the difference in height from the muzzle to the center of the sight. I will do this by using sockets and get locations of them. After that I will take the known distance we want to shoot for and add half the difference between the horizontal position of the muzzle and the sight.
So it will look like tan(d) = (abs(muzzlelocation.z - sightlocation.z))/ ((abs(muzzlelocation.x - sightlocation.x)/2) + initial zero distance(ex. 4572cm (aka 50 yards)). Then we will solve for d and angle the camera/hololense using it.
All you will really have to provide is the correct socket points and the distance you want to zero at. The script itself will reangle the sight in real time.
That will give us a good first zero point, from there it will be up to your bullet trajectory logic to make sure the second zero point (for this example 200) is correct. If you are using hitscan your weapon will be virtually useless after 100 yards using this example.
For hitscan users I recommend zeroing at 100 for the flattest trajectory but be aware you are going to be over your target and 300 to 400 yards.
The other option I am mulling around is getting a point a distance in front of the muzzle (like 50 yards (4572cm)) and then forcing the camera, or lens to rotate to face this point. This actually might be easier.