Author Topic: Hud Not Centred  (Read 2729 times)

0 Members and 1 Guest are viewing this topic.

Offline CKid

Hey guys, It's me again with another problem involving 03-14-XT build. My primaries and hud crosshairs does not line up. Depending on the fighter that I select, the shots are off by a few degrees. I think my hud is not lined up correctly with my screen. My monitor is not a widescreen and running at 1024 x 768 ingame.
If I agreed with you, we would both be wrong

 

Offline colecampbell666

  • I See Dead Pictures
  • 212
  • Evolution and ascension.
I get this with newer builds as well, all recent kara builds, plus Wanderer's recent build. (080611)
Gettin' back to dodgin' lasers.

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
It may be a problem with the view slewing TrackIR stuff. Can you post a screenshot please?

 

Offline colecampbell666

  • I See Dead Pictures
  • 212
  • Evolution and ascension.
Voila:


Not using TrackIR.
Gettin' back to dodgin' lasers.

  

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Maybe it has something to do with faulty viewpoints (or are they called eyepoints?)

 

Offline colecampbell666

  • I See Dead Pictures
  • 212
  • Evolution and ascension.
I doubt it, it happens with every ship.
Gettin' back to dodgin' lasers.

 
Is it with all campaigns?
Fun while it lasted.

Then bitter.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
It may be a problem with the view slewing TrackIR stuff.
Yep, looks like you introduced several bugs with that feature.  See the first attached screenshot, for example.

There are a number of issues here.  First of all, you neglected to include the HUD_nose_x and HUD_nose_y in all the appropriate places, so the FS1 HUD no longer aligns properly.  Second of all, it looks like your HUD_get_nose_coordinates function does not default to 0 -- which it should -- when the viewer is level and pointed directly ahead.

I've added the missing HUD_nose_x and HUD_nose_y offsets in hudreticle.cpp so that the FS1 HUD now displays properly; see the second attached screenshot.  However, the centering code is still broken.  I've disabled it for the time being, so why don't you take a look and see if you can fix it.  I bet once you fix that bug, this thread's bug will be fixed as well.

[attachment deleted by admin]

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Nice method of lighting a fire under my ass. :D

Two things are affecting the accuracy of the nose calculation for the HUD. First, I scaled the ship's forward vector too small of a value. The prior calculated magnitude was probably too small to give an accurate vertex projection. Second, I forgot to unscale the projected offsets from the unconventional resolutions to the Freespace defaults. I didn't know that a gr_unsize_screen_posf existed until today. :)

So yeah, bug fixed. It's in the SVN repo.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Much better. :yes:

However, it's still not 100% fixed. :p When the viewpoint is level and straight ahead, x is 0, but y is 1.

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Much better. :yes:

However, it's still not 100% fixed. :p When the viewpoint is level and straight ahead, x is 0, but y is 1.
Okay, I've gone and scaled the forward vector by 10000 instead of 1000. I seem to get (0,0) now for the HUD offsets when centered. Hopefully that'll end this bug once and for all. :sigh:

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Yup, that seems to have fixed it. :)