[GZDoom g2.2pre-1504+] Pitch doesn't work correctly

Bugs that have been investigated and resolved somehow.

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.
Post Reply
User avatar
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

Post by Ozymandias81 »

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
PITCHY.zip
Run it with Doom 2, actors are placed with random pitch on map
(14.95 KiB) Downloaded 41 times
User avatar
AFADoomer
Posts: 1344
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Re: [GZDoom g2.2pre-1504+] Pitch doesn't work correctly

Post by AFADoomer »

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...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
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

Post by Graf Zahl »

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.
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [GZDoom g2.2pre-1504+] Pitch doesn't work correctly

Post by Nash »

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...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
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

Post by Graf Zahl »

I still need to decide whether to flip the pitch in UDMF or not. Right now I have insufficient information.
User avatar
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

Post by Ozymandias81 »

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 :cool:
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [GZDoom g2.2pre-1504+] Pitch doesn't work correctly

Post by Nash »

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?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
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

Post by Graf Zahl »

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.
User avatar
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

Post by NeuralStunner »

Is this the sort of thing you could preemptively add an internal compat flag for, then fix anyway?
User avatar
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

Post by Tormentor667 »

The question generally is now, if we as modders need to change the mods or if GZDoom's code will be changed instead?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
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

Post by Graf Zahl »

I need some feedback. How is pitch handled elsewhere? Is positive pitch upward or negative?
User avatar
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

Post by Major Cooke »

In normal circumstances, -pitch = aiming up. I.e. A_SetPitch(pitch-5) will kick the aim of a player upwards.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
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

Post by Graf Zahl »

In that case: change the mod. Despite my best efforts I haven't found anything that depends on this inconsistency.
User avatar
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

Post by Tormentor667 »

That helps clearing things up and continueing work. But this means also that MaxED should take care of that concerning GZDoomBuilder :)
Post Reply

Return to “Closed Bugs [GZDoom]”