
Add Player.ViewX and Player.ViewY
Moderator: GZDoom Developers
-
- Admin
- Posts: 6080
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
Add Player.ViewX and Player.ViewY
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.


-
- Posts: 186
- Joined: Fri Apr 12, 2013 10:51 am
Re: Add Player.ViewX and Player.ViewY
This would be really handy for leaning over corners.
-
- Admin
- Posts: 6080
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
Re: Add Player.ViewX and Player.ViewY
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.


-
- Posts: 131
- Joined: Wed Nov 30, 2016 12:51 am
- Graphics Processor: nVidia with Vulkan support
Re: Add Player.ViewX and Player.ViewY
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.
-
- Posts: 13299
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Add Player.ViewX and Player.ViewY
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 

-
- Posts: 131
- Joined: Wed Nov 30, 2016 12:51 am
- Graphics Processor: nVidia with Vulkan support
Re: Add Player.ViewX and Player.ViewY
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?Rachael wrote:That's still the case when using the classic software renderer mode
-
- Posts: 13299
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Add Player.ViewX and Player.ViewY
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.
-
- Admin
- Posts: 6080
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
Re: Add Player.ViewX and Player.ViewY
This was added as ViewPos

