Crosshair fix?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
Blackgrowl
Posts: 99
Joined: Sun Oct 06, 2019 8:47 am
Graphics Processor: nVidia with Vulkan support

Crosshair fix?

Post by Blackgrowl »

Hi, I remember somewhere in 2022 or 2023, there was a thread where somebody posted a code on how to fix the crosshair.

Said fix was about moving the "fire" a bit more to the top so it's more accurate to the crosshair itself, because apparently GZDoom (Or perhaps it was Doom itself) has an inaccuracy with it where it's more at the bottom, this is visible when use Precise Crosshair or Laser Sight mod, where the Laser Sight tends to be below the Default Crosshair itself, especially when close at about 1 to 9 metres.

Could someone help me find it? Also, is it possible to use it as a "universal" fix for all weapon mods?
User avatar
Enjay
 
 
Posts: 27627
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Crosshair fix?

Post by Enjay »

The problem stems from the fact that the Doomguy's view is quite low (41 units from the ground IIRC). This effectively puts his eyes in his chest. However, the crosshairs are centred on the screen and the two things don't match up properly.

The way I have addressed this in the past is to have a custom player class with a modified viewheight and a modified AttackZOffset (which changes the height that attacks originate from). However, both of these will change the feel of the game.

Return to “Scripting”