Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ControllerTweaks: added SmoothAnalogTurning #477

Merged
merged 2 commits into from
Mar 17, 2023

Conversation

pas-de-2
Copy link
Contributor

@pas-de-2 pas-de-2 commented Mar 5, 2023

#145

This adds smooth analog turning for gamepad controls. Max turn speed is the same as vanilla. It should feel very similar to RE5's type A/B controls.

smoothturn.webm

Another benefit to this option is that it's now possible to play with a very low deadzone value without struggling to keep Leon moving in a straight line.

Updated test build v3:
dinput8.zip

Potential room for improvement:

  • Add support for analog steering the boat
  • Add an option for RE: Revelations-style controls where stationary left/right turning is fully analog as well. Would need to figure out how to slow down the turn animation speed or it'll look really odd. Combine with an option to enable Revelations-style autorun based on analog throw?

Side note: I had to migrate most of the bFixTurningSpeed fixes here, which just left behind fixes for pl_R1_Crouch in FrameRateFixes.cpp. Is that function actually used in the game anywhere, or is it a holdover from 3.5?

Makes the horizontal deadzone independent of any Xinput override
@nipkownix
Copy link
Owner

Looks pretty good!

which just left behind fixes for pl_R1_Crouch in FrameRateFixes.cpp. Is that function actually used in the game anywhere, or is it a holdover from 3.5?

Haven't checked if it is this one, but I think it is used at least here:
https://youtu.be/KF9vYZuT1z8?t=902

Might be used in the mine cart section too, but I'm not sure.

Add an option for RE: Revelations-style controls where stationary left/right turning is fully analog as well. Would need to figure out how to slow down the turn animation speed or it'll look really odd.

Something like the Type B MouseTurning would work fine, right? I'm pretty sure the hooks for that would work if you changed them to use the controller stick values.

@pas-de-2
Copy link
Contributor Author

Haven't checked if it is this one, but I think it is used at least here:
https://youtu.be/KF9vYZuT1z8?t=902

Ah good call, yes it's used to control the camera here.

Something like the Type B MouseTurning would work fine, right?

That should work to physically turn Leon, but I'd like to find some way to slow down the animation too, so his feet are actually shuffling slower at 0.3 analog tilt vs 1.0. Something like this:

output.webm

It's not too big a deal, though, I prefer RE5's controls anyways.

@nipkownix
Copy link
Owner

That should work to physically turn Leon, but I'd like to find some way to slow down the animation too, so his feet are actually shuffling slower at 0.3 analog tilt vs 1.0. Something like this:

Ah, right. I wanted to do something like that too, but couldn't find a way.

I'll go ahead and merge it, then. Many thanks, once again!

@nipkownix nipkownix merged commit 78f28f7 into nipkownix:master Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants