My take to fix Mobile mouse Controls!

Hello everyone my name is rotten, and I’ve recently been tackling the issue that many people usually forget to add to their game whether its in PVP fighting game, horror games, or any other game that requires a mobile user to interact with UI or 3d objects with their touch.

I have seen countless games or many people on this forum ask questions on how to fix mobile interaction when a player is on mobile is simultaneously walking and or jumping , and performing another action,

In these videos I demonstrate the fix wit the use of a ray-cast gun to show its use case for handling in 3d instance.
Plus I use UI animations with the dots and lines to show how it interactions in the UI world.

P.S:

  • The bluish box represents where the touches of a finger are allowed
  • The redish box represents where it isn’t allowed even in overlap with the blue box, along with the joystick
  • The green dot means the start of the touch
  • The redish dot means the end point of the touch
  • The purple lines means the touch registration on where its supposed to be

VIDEO 1:

VIDEO 2:

VIDEO 3:

Let. me know if the videos are not visible , I can repost them

** Also I hope to be making this into a module soon ( it is still in the works) an uploading it to the community for everyone here to enjoy and help allow mobile users to play with better accuracy

Also what other features would you recommend for this module ,
I will be included determining contact with rotated frames and this check is very optimized able to do tens of thousands of rotated box checks per render step without a noticeable drop in performance

Thank you , for checking this out! I also hope to get some feedback into making this more useful!

1 Like

I mean it’s alright, I also love the fact that you are thinking about mobile players, not many devs nowadays show any form of appreciation towards them.

Now, back to the module itself, I can definitely see it being useful but I do have a question. How would the movement (red box) and the shooting (blue box) work if they overlap eachother? I know in the video, the part of the red box that overlaps the blue one if we prompt it to shoot there, it won’t as it’s a forbidden zone. In the case we want the blue box to have priority over to the red one so basically the shots being prompted and getting approved by whatever system you have, is there some sort of prioritization going on in the background in order to make that happen?

(Sorry for this entire yappathon of mine, let me know if you need me to explain something further)

1 Like

Thank you for the reply , I really appreciate the thorough critique you gave me. For the question you raised about the priority issue its a simple if statement check that checks the boxes zIndex so if the zIndex is the same it will cancel out each other out but if the blue boxes z index would be higher that the reds than it will allow contact in that overlapping zone. However, I have set it to off to show how the zones can affect each other it also works with a variety of shapes as well. I hope to intend to make this for developers who don’t really have enough time to focus on adding a better implementation so again thanks for the criticism and praise!

1 Like

I should’ve showed a demo of the zones rotating slowly to show its true capabilites, and gave color to the different finger touches that take part. I can upload it if people would like to see!

Thank you for the answer, and yeah makes sense but in my opinion I think having a clear way to customize and having a set priority system would help developers that might use it, including maybe me.

Either way, I do like the module itself and I do think it will turn out useful.

1 Like

Oh yeah I’ve been taking time to create and allow more free range access on the customization part of the module especially on the zone checks even without the Z-index. , Im hoping to also include it for controllers, yet again thanks for the feedback as I hope to help other developers save time in their game.

1 Like