Prevent rotation when target look input is consumed

This commit is contained in:
2026-04-25 15:51:07 +02:00
parent c94b82108f
commit 9471475e58

View File

@@ -537,6 +537,15 @@ export class FirstPersonNavigationController implements NavigationController {
return;
}
const targetLookConsumed =
this.context?.handleRuntimeTargetLookInput?.(
event.movementX > 0 ? 1 : event.movementX < 0 ? -1 : 0
) ?? false;
if (targetLookConsumed) {
return;
}
this.yawRadians -= event.movementX * LOOK_SENSITIVITY;
this.pitchRadians = clampPitch(
this.pitchRadians - event.movementY * LOOK_SENSITIVITY