Fix jumping when using move360 with a controller

combined_windows_build
Petr Mikheev 3 years ago
parent 1ca0a3a555
commit 5f0a7c2b16

@ -277,7 +277,7 @@ namespace MWInput
{ {
gamepadToGuiControl(arg); gamepadToGuiControl(arg);
} }
else if (MWBase::Environment::get().getWorld()->isPreviewModeEnabled() && else if (mBindingsManager->actionIsActive(A_TogglePOV) &&
(arg.axis == SDL_CONTROLLER_AXIS_TRIGGERRIGHT || arg.axis == SDL_CONTROLLER_AXIS_TRIGGERLEFT)) (arg.axis == SDL_CONTROLLER_AXIS_TRIGGERRIGHT || arg.axis == SDL_CONTROLLER_AXIS_TRIGGERLEFT))
{ {
// Preview Mode Gamepad Zooming; do not propagate to mBindingsManager // Preview Mode Gamepad Zooming; do not propagate to mBindingsManager

@ -135,7 +135,7 @@ local function zoom(delta)
end end
local function applyControllerZoom(dt) local function applyControllerZoom(dt)
if camera.getMode() == MODE.Preview then if input.isActionPressed(input.ACTION.TogglePOV) then
local triggerLeft = input.getAxisValue(input.CONTROLLER_AXIS.TriggerLeft) local triggerLeft = input.getAxisValue(input.CONTROLLER_AXIS.TriggerLeft)
local triggerRight = input.getAxisValue(input.CONTROLLER_AXIS.TriggerRight) local triggerRight = input.getAxisValue(input.CONTROLLER_AXIS.TriggerRight)
local controllerZoom = (triggerRight - triggerLeft) * 100 * dt local controllerZoom = (triggerRight - triggerLeft) * 100 * dt

Loading…
Cancel
Save