Download

Rotate Character To Mouse Location Or Gamepad Right Thumbstick

Hello,

I have been trying to replicate Hotline Miami or even Ruiner controls in a BP. The character rotates to the mouse’s XY position if using a mouse or rotates with the right thumbstick if using a gamepad. I have been able to get both of these controls working separately with research and following tutorials. However, when trying to combine them I have had no luck. As seen in the attachment, I tried capturing the current XY coordinates of the mouse and if that hasn’t changed it will check if the player is using a gamepad within the threshold. If I use the gamepad to rotate the character, after letting go it will reset to the mouse’s XY. Any idea how to go about solving this. I have tried researching and found nothing dealing with switching between the two.

I also have another problem with the camera jerking while rotating quickly from left to right. Any advice with this would also be appreciated.