Tested in gc7d28b0
When you're walking in shallow (3D floor) water, the player's pitch is taken into account for the XY movement. Which means the more you are looking up or down, the slower the XY movement. At straight 90 degrees up or down, the player won't move in XY directions at all.
Test WAD: just step into the shallow water area and look up or down and see how the XY movement is affected by the player's pitch.
Player pitch affects XY movement in 3D shallow water
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.
Player pitch affects XY movement in 3D shallow water
- Attachments
-
- ShallowWater.zip
- (1.07 KiB) Downloaded 18 times
Re: Player pitch affects XY movement in 3D shallow water
I looks like it always works like that thanks to this line. The corresponding C++ code did the same thing long ago before scriptification.
Probably this was not noticed because of limited view pitch in software renderer.
Probably this was not noticed because of limited view pitch in software renderer.
Re: Player pitch affects XY movement in 3D shallow water
In my opinion, the player should continue to move as if on solid ground (but still affected by the friction of being underwater) as long as he isn't submerged deep enough into the water. How deep is enough, one might ask? I'm not sure. Maybe a full body's height?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Player pitch affects XY movement in 3D shallow water
To be honest, I have absolutely no idea whatsoever what this code is trying to do. The entire check looks utterly nonsensical.
But I also have no idea whatsoever what might break if this changes so I'm just leaving it as it is.
This really needs input from Randi. I do not think there's any other person who might shed some light upon it.
But I also have no idea whatsoever what might break if this changes so I'm just leaving it as it is.
This really needs input from Randi. I do not think there's any other person who might shed some light upon it.
Re: Player pitch affects XY movement in 3D shallow water
Those calculations make sense for underwater and no gravity movement. But for shallow water (when waterlevel is 1) they are pretty weird indeed.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Player pitch affects XY movement in 3D shallow water
Correct, but keep in mind that the engine makes no distinction between an actor just diving in and one standing in shallow water.
Re: Player pitch affects XY movement in 3D shallow water
Understood. At some point I will need to create my player pawn's class overrides for my standalone game, so I'll have to end up fixing this myself... along with some other built-in annoyances like how holding down the Jump key actually makes you elevate faster than the +moveup key while underwater (essentially making +jump a cheat key to get out of water faster)...