Add Player.ViewX and Player.ViewY

Moderator: GZDoom Developers

Post Reply
User avatar
Caligari87
Admin
Posts: 6174
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Add Player.ViewX and Player.ViewY

Post by Caligari87 »

We already have Player.ViewZ, it would be really nice if we could set Player.ViewX (left/right) and Player.ViewY (forward/back) for custom offsets. Obviously these would have to rotate with the player's angle. The primary reason I'm thinking about this, ViewZ can be adjusted on-the-fly which allows for easy custom movement bobbing. There are a multitude of related effects that would otherwise only be possible by actually moving the player, which isn't always optimal.

8-)
RaveYard
Posts: 186
Joined: Fri Apr 12, 2013 10:51 am

Re: Add Player.ViewX and Player.ViewY

Post by RaveYard »

This would be really handy for leaning over corners.
User avatar
Caligari87
Admin
Posts: 6174
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Add Player.ViewX and Player.ViewY

Post by Caligari87 »

Indeed, that's one of the things I want to use it for. Without this, such a feature would involve spawning separate hitboxes for the player and making their collision very narrow. This way, it naturally works to keep the player's normal bounding box partially hidden while still allowing sight around corners.

8-)
User avatar
nazakomu
Posts: 131
Joined: Wed Nov 30, 2016 12:51 am
Graphics Processor: nVidia with Vulkan support

Re: Add Player.ViewX and Player.ViewY

Post by nazakomu »

If I recall correctly, this wasn't possible in software and the implementation is A_Roll (which doesn't change the player's position), and that is exclusively for the OpenGL renderer.
User avatar
Rachael
Posts: 13542
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Add Player.ViewX and Player.ViewY

Post by Rachael »

That's still the case when using the classic software renderer mode, but the softpoly renderer can handle A_Roll. Nevertheless, supporting A_Roll or not has nothing to do with exporting Player.ViewX/Y ;)
User avatar
nazakomu
Posts: 131
Joined: Wed Nov 30, 2016 12:51 am
Graphics Processor: nVidia with Vulkan support

Re: Add Player.ViewX and Player.ViewY

Post by nazakomu »

Rachael wrote:That's still the case when using the classic software renderer mode
This is interesting. I know Duke 3D tilts the camera at the player's death. And there was also a camera feature exclusive for it as well, which allowed you to look to your left or your right. Is there something that BUILD can do with the camera that just isn't ever going to be possible whatsoever for the software renderer to do on QZDoom?
User avatar
Rachael
Posts: 13542
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Add Player.ViewX and Player.ViewY

Post by Rachael »

I think Duke cheats and simply draws the screen first and then rotates the buffer, itself. There are no plans to do that in QZDoom at this time, that I know of.
User avatar
Caligari87
Admin
Posts: 6174
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Add Player.ViewX and Player.ViewY

Post by Caligari87 »

This was added as ViewPos

8-)
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”