From b4b19f241be00b529673e4c81bd2d77993b6e7c3 Mon Sep 17 00:00:00 2001 From: FluffyQuack Date: Sat, 27 Feb 2021 00:08:50 +0100 Subject: [PATCH] Fix to "look" input code so it correctly uses joystick input from the gamepad selected in controller settings (#327) --- src/camera.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/camera.h b/src/camera.h index db7700d..e3f68d6 100644 --- a/src/camera.h +++ b/src/camera.h @@ -418,7 +418,7 @@ struct Camera : ICamera { if (mode == MODE_LOOK) { float d = 3.0f * Core::deltaTime; - vec2 L = Input::joy[cameraIndex].L; + vec2 L = Input::joy[Core::settings.controls[cameraIndex].joyIndex].L; L = L.normal() * max(0.0f, L.length() - INPUT_JOY_DZ_STICK) / (1.0f - INPUT_JOY_DZ_STICK); lookAngle.x += L.y * d;