Jamieh
Topic Author
Posts: 70
Joined: 12 Apr 2019, 00:30

3.1.7/Unity: Broke Touch Input on mobile

16 Nov 2023, 10:18

On Noesis 3.1.7/Unity I had mouse input working on WebGL and touch input working on mobile (iOS & Android). However something I've done since my last release 3 months ago has caused the touch behavior to be acting much different on mobile--I must have flipped a setting somewhere but for the life of me I can't figure out what.

I'm now getting both a TouchDown AND a MouseEnter event on a Touch. And if I just hold my finger down, I get continuous TouchMove events at the same location whereas before I'm pretty sure I only got them when the location changed.

I think I can work around this new behavior by #ifdefing out mouse events on mobile and by suppressing consecutive TouchMove events at the same location. For all I know this is the "right" behavior and I was working by accident before. But if anyone has an idea of what setting I might have changed I'd love to figure that out.

Thanks!
 
User avatar
jsantos
Site Admin
Posts: 3939
Joined: 20 Jan 2012, 17:18
Contact:

Re: 3.1.7/Unity: Broke Touch Input on mobile

17 Nov 2023, 18:35

Both behaviors are expected. An unhandled TouchDown will be promoted to MouseDown (getting a MouseEnter) and TouchMoves are always repeated per frame, even if fingers are not moved.

I am not sure what could have changed, maybe the touch emulation in the View (EmulateTouch property) ?
 
Jamieh
Topic Author
Posts: 70
Joined: 12 Apr 2019, 00:30

Re: 3.1.7/Unity: Broke Touch Input on mobile

17 Nov 2023, 20:16

Thanks--I will check that. I have reworked how I was handling touch events and it's all working again. It's just odd because I hadn't really changed anything since the previous release 3 months ago (that I know about) so it's weird that the behavior just changed.

I clearly changed something without realizing it.

Who is online

Users browsing this forum: Ahrefs [Bot] and 4 guests