nipkownix / re4_tweaks

Fixes and tweaks for the "UHD" port of Resident Evil 4
zlib License
341 stars 33 forks source link

ControllerTweaks: added SmoothAnalogTurning #477

Closed pas-de-2 closed 1 year ago

pas-de-2 commented 1 year ago

https://github.com/nipkownix/re4_tweaks/issues/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:

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?

nipkownix commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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!