How to turn 90 degrees with mobile touch input?

Hi
I am working on a project where we run forward and in some point we need to turn 90 degrees in a direction to not die.
I made this happen with A, D, Left, Right keyboard keys but i also want it to work on touchscreen.
I tried many ways and channging x axis scale or values does not work.
Any help?

Hello PlatinumBlade,

This should be able to help you out:

As for doing it with a touch device, you can have Widgets set up as buttons on the screen to press that will turn the player in the desired direction. You could even make them invisible but cover one half of the screen each so that if the player touches the left, they’ll turn left and vice-versa.

That is exactly my problem, I tried to create UMG buttons, but I can’t make the character to turn the desired direction when I click any of the these two buttons. Can you give me some help on the blueprint?

To manually set the rotation of a player, try Get Player Controller > Set Control Rotaion

That does not work, there is nothing for the button blueprint for get player controller or set control rotation

After a good while, I finally realised my problem and got this to work, thanks for the help :slight_smile:

Ah glad to hear it. I would’ve responded but it seems that this one fell through the cracks of our tracking so I had completely forgotten about it. I apologize for that.