mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
physics: also block strafe input when movement is rooted
This commit is contained in:
parent
21604461fc
commit
dd6f6d1174
1 changed files with 5 additions and 4 deletions
|
|
@ -287,14 +287,15 @@ void CameraController::update(float deltaTime) {
|
|||
// WoW-like third-person keyboard behavior:
|
||||
// - RMB held: A/D strafe
|
||||
// - RMB released: A/D turn character+camera, Q/E strafe
|
||||
// Turning is allowed even while rooted; only positional movement is blocked.
|
||||
if (thirdPerson && !rightMouseDown) {
|
||||
nowTurnLeft = keyA;
|
||||
nowTurnRight = keyD;
|
||||
nowStrafeLeft = keyQ;
|
||||
nowStrafeRight = keyE;
|
||||
nowStrafeLeft = !movBlocked && keyQ;
|
||||
nowStrafeRight = !movBlocked && keyE;
|
||||
} else {
|
||||
nowStrafeLeft = keyA || keyQ;
|
||||
nowStrafeRight = keyD || keyE;
|
||||
nowStrafeLeft = !movBlocked && (keyA || keyQ);
|
||||
nowStrafeRight = !movBlocked && (keyD || keyE);
|
||||
}
|
||||
|
||||
// Keyboard turning updates camera yaw (character follows yaw in renderer)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue