Page MenuHomeFeedback Tracker

discrete zeroing camera point (for animated iron sights) causes bad camera offset
New, NormalPublic

Description

The feature for defining different eye points based on the zeroing setting is a very nice feature, BUT there is a serious error with it. The result of this error is that it is basically impossible to set up properly aligned sights, that work and look correct, unless you spend an unjustifiably huge amount of time to trial and error every single zeroing position and apropriate sight animation to match.

The error is that there is a position / translation offset ,which increases with increasing view angle in relation to the sight unit (defined by the eye points). The angle itself matches the defined one well, but the camera offset breaks the system.
So for example when defined in the config as this

	discretedistance[] = {50,100,150,200,250,300,350,400,440};
	discreteDistanceCameraPoint[] = {"eye_50", "eye_100", "eye_150", "eye_200", "eye_250", "eye_300", "eye_350", "eye_400", "eye_440"};
	cameraDir = "eye_lookat";

and with a memory point set up like this:
Schematic Image Example
(Grey and blue parts are the adjustable, rotating sight, which rotates around a point identical to the "eye_lookat" point; Purple represents the barrel)

Now in theory the sight line (green), when the sight is rotated will always be exactly lined up with the matching discrete eye point pair, keeping the sight perfectly aligned on the screen. In practice this doesnt work at all. The angle is correct, as said, but the position of the camera gets moved in relation to the weapon's body, as shown in this picture series of my example:
Ingame Example
In this picture the center of the screen is the little white dot (marked by pink arrow on the most left picture in the series). Notice how the sight, in relation to the center of the screen moves when changing the zeroing setting. The cyan part is the rear sight piece, the orange piece is the front sight piece. They are never aligned properly due to the offset. The other little boxes are just to confirm that the animation of the sight is working exactly as i defined (and matched with the multiple eye points).

Even for sights that use a reddot (and therefore get around having to align the sight animation precisely) , the translation makes it so that the defined angle becomes useless, as the aim will be higher/lower due to the heigth offset of the aimpoint. The look at point (cameraDir = "eye_lookat";) can not be animated, it's position is only read on initialization apparently. This complicates things for sights, which do not have their center of rotation in the sight line itself (like my example has for simplification reasons). Same for ladder sights, as the angle of view on to the front iron sight piece will change with elevation and due to 3D shape, causes a shift of the aim point

Solution:

  1. Re-check code and implementation for potential errors and ensure that the cameraDir point will always end up in the center of the screen.
  2. Define discrete cameraDir points to each discreteDistanceCameraPoint has a matching counterpart, and where every cameraDir point will guarantee that it is at the center of the screen. e.g.
	discreteDistanceCameraPoint[] = {"eye_50", "eye_100", "eye_150"};
	cameraDir[] = {"eye_dir_50", "eye_dir_100", "eye_dir_150"};

Details

Severity
Tweak
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
Modding
Steps To Reproduce

use vanilla rifle with grenadelauncher, select grenadelauncher, notice how the sight point moves up/down (in relation to the center of your screen) when changing zeroing position. It shouldn't. Only the elevation angle of the view should change.

Event Timeline

Fennek created this task.Jan 11 2017, 11:02 PM
Fennek edited Steps To Reproduce. (Show Details)
Fennek updated the task description. (Show Details)Jan 11 2017, 11:10 PM
Fennek edited Additional Information. (Show Details)
Fennek updated the task description. (Show Details)Jan 11 2017, 11:15 PM
Fennek edited Additional Information. (Show Details)
Fennek updated the task description. (Show Details)Jan 11 2017, 11:18 PM
oukej added a subscriber: oukej.Jan 12 2017, 6:45 PM
kllrt added a subscriber: kllrt.Jan 12 2017, 6:52 PM

I noticed that if you deploy the grenade launcher (bipod) then everything works correctly, as soon as you end deployment, it is busted again.