1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-01 02:40:43 +02:00

Fix to "look" input code so it correctly uses joystick input from the gamepad selected in controller settings (#327)

This commit is contained in:
FluffyQuack
2021-02-27 00:08:50 +01:00
committed by GitHub
parent 25df2d8def
commit b4b19f241b

View File

@@ -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;