The way you have it set up means that your character is going to continue adding yaw input (aka continue rotating) until you release your finger from the screen. The further you drag your finger away from the initial touch location, the faster he’s going to spin.
Could you please tell me how to fix it, I’m still learning and watched a video he did that
Hey guys I have issue when implemented touches for mobile, I need to movement using left joystick but looking around need to use mobile screen touch instead right joystick I have done but the character behaves weird
Here is the link for reddit with screen recording and the blueprint code
I’m using default control but using the left joystick only as I want to the rotation by screen touch
Touch controls from scratch aren’t super easy. I would recommend using the built in joystick interface if you’re new. If you absolutely can’t, then the first thing I would do is learn to use the input touch node.
This generates events when you press/move/release, so you don’t have to use tick. You can then store which finger pressed down and how it moved. Keep in mind that your rotating finger could be finger 1 if you’re not already touching the left stick, or it could be finger 2 if you are already touching the left stick.
As for calculating the rotation itself, you will need to use the “moved” and “pressed” vectors to “Find Look At Rotation”. This will give you a rotator that you can plug into “Set Control Rotation”.
Yes I know, I meant I would recommend using the right stick for rotation as well unless you want to learn to do the other things I mentioned.
I already set up the the game pad controller using the thumbtsticks X and Y for gamepad, and using right trigger as firing
What about firing? can I use the same right joystick and add firing as well?
Yes, you can. If you set your right stick to use the “Gamepad Right Thumbstick X-Axis” and “Gamepad Right Thumbstick Y-Axis” you can then create input events in the character or controller that fires whenever either of those is not 0.