Touch AND mouse controls in builds

Hi there,

Just a question about touch and mouse input on HTML builds. In the simulator in Unity mouse clicks work, but when I build to MaxOs and/or WebGL mouse click no longer work. I know this is for mobile games and it does work on mobiles, I would just like to know if there is a quick fix to allow for and/or switch to mouse clicks?

Thanks
John

Touch input is only meaningful on Mobile games. For WebGL, MacOS, or PC, you’ll need to reference the mouse directly instead of using Touch. (In the games in this course, we’re remapping the mouse to Touch in the Editor, but that doesn’t mean anything outside of the Editor).

Thanks Brian,

Yes, I got to the understanding that mouse to touch controls were just being simulated in the editor Shame there isn’t a button in Unity to make that happen for real :slight_smile: Anyway, I had a good go at tweaking the code to get the mouse to work including disabling the touch controls and using the new and old input systems. Probably learnt something in the process, but still a bit beyond me unfortunately. In the end, I added a button to launch the ball from the mouse position. At least it is now ‘playable’ on my webGL build… And, I now know I need to study mouse controls!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms