How to let camera move while still touching a mobile button?

I’m making a first person shooter game, and some people who play the game play on mobile. The guns do not work properly when playing on mobile, and I want to fix this.

I have created a solution to this, which is to create a button next to the jump button that fires the gun when it is clicked. You can still move the camera while holding down this button, and the button continues being pressed down until the user lifts the finger they used to press the button. That way, I can keep the normal posture (the thumbs resting on the bottom corners of the screen), with the user being able to move their character and camera while shooting, and so the user can move their camera without shooting.

The issue is that when I tested the button on the Studio emulator, I can’t move the camera while the button is still being pressed, which probably means that I can’t do that on a real mobile device. And I have searched for solutions on the dev hubThere appears to be nothing about this.

3 Likes

Try actually using a mobile device, you only have a single point on the emulator since you have the mouse.

The studio mobile emulator isn’t the best. I’d suggest trying to test the game on a compatible mobile device (if you have one) or perhaps getting a friend to as this is the only really good way to get a feel of how it would actually work for mobile users. Good luck!

I’m aware this is old however I found from another post that setting your fire button’s Active property to false allows camera movement. I tested this and it works!

6 Likes

thank you so much, you kind, beautiful soul. this is exactly what I was looking for

1 Like