mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-05 04:37:50 +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:
@@ -418,7 +418,7 @@ struct Camera : ICamera {
|
|||||||
if (mode == MODE_LOOK) {
|
if (mode == MODE_LOOK) {
|
||||||
float d = 3.0f * Core::deltaTime;
|
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);
|
L = L.normal() * max(0.0f, L.length() - INPUT_JOY_DZ_STICK) / (1.0f - INPUT_JOY_DZ_STICK);
|
||||||
|
|
||||||
lookAngle.x += L.y * d;
|
lookAngle.x += L.y * d;
|
||||||
|
Reference in New Issue
Block a user