Fix sudden camera jump from looking down to looking up

This commit is contained in:
James Lambert 2023-11-24 19:41:20 -07:00
parent f43de9167b
commit e0ee75e34c

View file

@ -900,7 +900,7 @@ void playerUpdate(struct Player* player) {
float pitchSign = signf(player->pitchVelocity);
if (!didPassThroughPortal && lookingForward.y * pitchSign > newLookingForward.y * pitchSign) {
if (!didPassThroughPortal && lookingForward.y * pitchSign > newLookingForward.y * pitchSign && lookingForward.y * pitchSign > 0.0f) {
struct Vector3 newForward = gZeroVec;
newForward.y = pitchSign;
struct Vector3 newUp;