Tool crosshair not matching camera CFrame

It has come to my notice today that the projectiles fired by my tools travel a trajectory slightly below the crosshair. My tools take the camera’s CFrame as input for the trajectory and assumes that the crosshair will always be in the center of the viewport.

I was able to reproduce this issue personally on Mad Games, using Windows 8.1

The crosshair doesn’t even visually land on the center of the viewport in this full screenshot. The red line marks the desired position of the crosshair verticaly.

1 Like

Isn’t this just topbar offset?

The topbar is 36 pixels tall. Despite the GUI space being offset downwards by this much, the camera space has not changed, and neither has the location of the mouse on the screen. To combat the topbar’s disruptive effects, you must center the retical by setting its center to,0,0.5,-18).

1 Like

It took me too long to figure that out.