How to Improve Mobile Input for my Plane System?

I’m having an issue with my plane system on mobile platforms. As you can see, there are mobile buttons in the top right for my plane system that the mobile player would use for accessing weapons, etc.

However, when the player taps on these buttons, the script registers the tap also being used to steer the direction of the plane, as you can see in this GIF.. The player taps to fire the machine guns, but the plane then suddenly jerks to the right.

How would I be able to make it so, when a player taps on those buttons (via a MouseButton1Click on the UI element click), it also won’t trigger changing the plane’s direction (done via a separate MouseButton1Click event)?

1 Like

I am still having issues with this. Is there any fix?

Your turning for the plane should have a debounce like local VeeringRight = true when you are holding onto the right side of the screen. You can set VeeringRight to false upon pressing one of these buttons which would disable it from turning.

I believe if you set the Active property of the gui button to True, then it will not register anything pressed beneath that button.

1 Like

This did not fix it. The “Active” property is true already for all of them

How are you detecting the input for the buttons? Mousebutton1Click or MouseEnter?

MouseButton1Click, not MouseEnter. Would that even make a difference? Because when a user goes to tap a button, that is a MouseButton1 click which will also register for the Click Move.

Add a frame behind the buttons? That is only accessible when sitting in the seat of the vehicle.

MouseEnter isnt really applicable for mobile (unless for some reason they have a mouse), even if the player were to press down without releasing to my understanding that event would be “MouseButton1Down”