Flat Sprite rotation fix

Moderator: GZDoom Developers

Post Reply
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:

Flat Sprite rotation fix

Post by Major Cooke »

Pull Request (Currently marked as draft)

I was made aware some time ago that flat sprites did not have the same rotation code as models, which is supposedly the appropriate manner of doing so. This PR will bring it in line with the model rotation code and behave just like it. However, any mods reliant on the old behavior will inevitably be forced to update their code as it's no longer representing the current means of rotation.

As such I'm expecting to get flak for this. Probably a lot. :shock:

Attached is a demonstration file. Use "give z" in console and two sprites will spawn, featuring a sprite on a flat model plane (left) and a flat sprite (right).

The current implementation means users can avoid using quaternions or whatever else is there to keep the angle and pitch consistent, but the PR will ensure consistency so those who use models don't need a separate condition.

Personally, I'm torn directly down the middle if I want this or not, so I've marked the PR as draft so we can have a calm and civil discussion about it.
Attachments
flatsprmodel.pk3
"give z" in console. Red is angle, green is pitch, blue is roll.
(1.22 KiB) Downloaded 48 times
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49235
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Flat Sprite rotation fix

Post by Graf Zahl »

I wish this feature could be shitcanned entirely.
One thing I definitely have on the table is to deprecate the entire flat/wallsprite functionality that's currently there and make these things useful by restricting them to what *walls* and *flats* actually are.

That said, this can only go in with a compatibility option.
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: Flat Sprite rotation fix

Post by Major Cooke »

On second thought, I'm closing this. This would break VisibleAngles/Pitch with it, which some mods rely upon to hide the backside. Adding a compatibility option with it would only increase the code bloat in it as well, and cache misses.

Those that want to use the actual proper rotation can use a flat model.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”