How to disable the touch control that emulates a right mouse click on mobile devices?

I’m trying to make a gun control system that is like a typical console shooter, where you would control the movement with one joystick/control and the camera movement with another joystick/control.
I’ve managed to do it on PC:

I tried doing:

player.DevTouchMovementMode = Enum.DevTouchMovementMode.Scriptable

But, it only disables the left thumbstick (which I want to use) and still doesn’t disable the emulator for right mouse clicks.
The right mouse click I’m talking about is the thing that makes you rotate around your character when holding down right click.

In addition, tapping also seems to emulate mousedown, which shoots the weapon… Is there a way to differentiate them?

1 Like

If you do not have a UI with a button to emulate a right mouse click then it is disabled/redundant by default.

You can only tap your screen on mobile devices aswell as use the movement pad and jump button. Tapping basically accounts for a left click. Nothing else.

1 Like

So what causes the screen to rotate when holding down a tap and dragging?

Drag mechanic? Not sure.
When looking at all the UserInputTypes I only see touch as a valid member of mobile input.

Discovered the problem.
Holding the touch has a Delta.x and Delta.y like a mouse would, which the script I’m using reads to move the camera.

Nice! Good luck on finding the fix!

The fix is simple but just putting this out here for anyone else that might encounter this problem:

userInputService.InputChanged:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.Touch then
		return
	end
2 Likes