Skip to content

Feet face aim yaw when leaning#1955

Open
AdamTadeusz wants to merge 4 commits intoNeotokyoRebuild:masterfrom
AdamTadeusz:357_feetFaceAimYawWhenLeaning
Open

Feet face aim yaw when leaning#1955
AdamTadeusz wants to merge 4 commits intoNeotokyoRebuild:masterfrom
AdamTadeusz:357_feetFaceAimYawWhenLeaning

Conversation

@AdamTadeusz
Copy link
Copy Markdown
Contributor

@AdamTadeusz AdamTadeusz commented Apr 28, 2026

Description

Move feet to aim towards the aim yaw when leaning, making peeking around corners at certain angles more fair

Toolchain

  • Windows MSVC VS2022

@AdamTadeusz
Copy link
Copy Markdown
Contributor Author

There's a problem on master especially noticeable with bots at the very start of freeze time where the upper body rotation stutters when moving while feet are planted in one spot. I've included a janky fix for that since its more noticeable on this PR with the feet following the player aim when leaning.

@AdamTadeusz AdamTadeusz requested a review from a team April 28, 2026 19:07
Rainyan
Rainyan previously approved these changes Apr 29, 2026
Comment thread src/game/shared/hl2mp/hl2mp_playeranimstate.cpp Outdated
@Rainyan Rainyan requested a review from a team April 29, 2026 08:48
@AdamTadeusz
Copy link
Copy Markdown
Contributor Author

@Rainyan I've noticed there is a hitch when moving between an angle of -180 and 180 when leaning. the issue seems to be in CMultiPlayerAnimState::ConvergeYawAngles where the value flDeltaYawAbs used to calculated the scale and therefore speed of rotation is calculated before the change in angle is normalized, so flScale will jump up to a value far greater than it should be, then get clamped down to 1 resulting in a small jitter as the rotation speeds up then slows down when moving between the two angles

hitchWhenMovingBetween180andMinus180.mp4

@AdamTadeusz AdamTadeusz requested a review from Rainyan April 29, 2026 10:37
@Rainyan Rainyan requested a review from a team April 29, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants