[GZDoom g2.2pre-1504+] Pitch doesn't work correctly
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
- Ozymandias81
- Posts: 2068
- Joined: Thu Jul 04, 2013 8:01 am
- Graphics Processor: nVidia with Vulkan support
- Location: Mount Olympus, Mars
- Contact:
[GZDoom g2.2pre-1504+] Pitch doesn't work correctly
While this is strange that nobody here told you this before, I see that the pitch doesn't work correctly since g2.2pre-1504-g47064e2 of GZDoom.
It works as intended with pre-builds since r1471.
Some screenies to show you what's going on
It works as intended with pre-builds since r1471.
Some screenies to show you what's going on
Re: [GZDoom g2.2pre-1504+] Pitch doesn't work correctly
Ironically the actor pitch and the pitch of projectiles spawned from that actor both align (properly?) now.
You can see this in my Spotlight Test .pk7 file ('summon spotlight 0' and kill any monsters, because autoaim). This is basically an actor set up to mirror the player's pitch. In older builds, the actor's model pitch correctly follows the player pitch, but projectiles (<!> sprites and the spotlight glow) are mirrored across the horizontal axis.
I'd love for this to be normal behavior for projectile pitch calculations, but I think there would need to be a flag to keep the old behavior...
You can see this in my Spotlight Test .pk7 file ('summon spotlight 0' and kill any monsters, because autoaim). This is basically an actor set up to mirror the player's pitch. In older builds, the actor's model pitch correctly follows the player pitch, but projectiles (<!> sprites and the spotlight glow) are mirrored across the horizontal axis.
I'd love for this to be normal behavior for projectile pitch calculations, but I think there would need to be a flag to keep the old behavior...
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [GZDoom g2.2pre-1504+] Pitch doesn't work correctly
The problem is, the pitch calculations for 'inheritactorpitch' had been wrong forever and treated positive pitch as 'upward' whereas internally it is 'downward'. That essentially meant that anything using actual pitch pointed in the wrong direction.
I could change the UDMF property to change its sign, too, but I have no idea what new problems THAT might introduce. With people refusing to upload their mods to /idgames and instead opting to host them elsewhere it has become impossible to get a comprehensive list of mods to check. It was easier when this kind of private hosting was less commonplace.
I could change the UDMF property to change its sign, too, but I have no idea what new problems THAT might introduce. With people refusing to upload their mods to /idgames and instead opting to host them elsewhere it has become impossible to get a comprehensive list of mods to check. It was easier when this kind of private hosting was less commonplace.
Re: [GZDoom g2.2pre-1504+] Pitch doesn't work correctly
So THIS was what broke my pitched model stuff, LOL!
Eh, no biggie, I guess I can just flip the signs mod-side; it's just a matter of me being nervous now because I just can't stop thinking of how many things I need to fix and the possibility of me missing something...
Eh, no biggie, I guess I can just flip the signs mod-side; it's just a matter of me being nervous now because I just can't stop thinking of how many things I need to fix and the possibility of me missing something...
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [GZDoom g2.2pre-1504+] Pitch doesn't work correctly
I still need to decide whether to flip the pitch in UDMF or not. Right now I have insufficient information.
- Ozymandias81
- Posts: 2068
- Joined: Thu Jul 04, 2013 8:01 am
- Graphics Processor: nVidia with Vulkan support
- Location: Mount Olympus, Mars
- Contact:
Re: [GZDoom g2.2pre-1504+] Pitch doesn't work correctly
I hope you'll get necessary info to fix this...
I really don't want to rotate hundred of models here and there and see them misplaced while building a map...
I wrongly think that this consideration of mine was enough for you to "fix" the issue, but I am not a developer and I could only imagine things this way then.
Hopefully something will happen. Thanks in advance anyway, GZDoom rocks in any case and this will never change eheh
I really don't want to rotate hundred of models here and there and see them misplaced while building a map...
I wrongly think that this consideration of mine was enough for you to "fix" the issue, but I am not a developer and I could only imagine things this way then.
Hopefully something will happen. Thanks in advance anyway, GZDoom rocks in any case and this will never change eheh

Re: [GZDoom g2.2pre-1504+] Pitch doesn't work correctly
Enjay used a ton of models in his GeneTech mod, and also Rex's Paranoia mod. Perhaps those projects would have a lot of test material to check with?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [GZDoom g2.2pre-1504+] Pitch doesn't work correctly
The problem is solely the 'pitch' property in UDMF. Due to the incorrect internal model rotation they are all positive when they really should be negative in the attached test map. Neither GeneTech nor Paranoid use UDMF so neither mod is affected.
In ZDoom, a negative pitch points upwards and a positive pitch points downwards and this has to be respected, otherwise all sorts of errors will come up.
In ZDoom, a negative pitch points upwards and a positive pitch points downwards and this has to be respected, otherwise all sorts of errors will come up.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: [GZDoom g2.2pre-1504+] Pitch doesn't work correctly
Is this the sort of thing you could preemptively add an internal compat flag for, then fix anyway?
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Re: [GZDoom g2.2pre-1504+] Pitch doesn't work correctly
The question generally is now, if we as modders need to change the mods or if GZDoom's code will be changed instead?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [GZDoom g2.2pre-1504+] Pitch doesn't work correctly
I need some feedback. How is pitch handled elsewhere? Is positive pitch upward or negative?
- Major Cooke
- Posts: 8212
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: [GZDoom g2.2pre-1504+] Pitch doesn't work correctly
In normal circumstances, -pitch = aiming up. I.e. A_SetPitch(pitch-5) will kick the aim of a player upwards.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [GZDoom g2.2pre-1504+] Pitch doesn't work correctly
In that case: change the mod. Despite my best efforts I haven't found anything that depends on this inconsistency.
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Re: [GZDoom g2.2pre-1504+] Pitch doesn't work correctly
That helps clearing things up and continueing work. But this means also that MaxED should take care of that concerning GZDoomBuilder 
