[solved] Detecting touches outside stage boundary

Anything libgdx related goes here!

[solved] Detecting touches outside stage boundary

Postby Magnesus » Sat May 26, 2012 6:47 am

On the edges of the screen touching actors in my game seems to work badly. At first I thought it was a problem with touchscreen sensitivity of my phone but then I realised that the problem might be that I position those actors outside of the stage boundary (when the screen has different aspect ratio).
I use getLastTouchedChild - might it be that it doesn't detect hits when they are outside of the stage (but still on screen)? If so - how to avoid it? Or touchscreen in my phone is just shitty? :)

Edit: I just realised that it's easy to check - just create a device with very wide screen in emulator, so the buttons are far from the stage - they still work, so the problem is with my touchscreen (unfortunately).
Magnesus
 
Posts: 1030
Joined: Sun Sep 25, 2011 3:50 pm

Re: [solved] Detecting touches outside stage boundary

Postby mzechner » Sat May 26, 2012 9:59 am

What device do you own?
mzechner
Site Admin
 
Posts: 4713
Joined: Sat Jul 10, 2010 3:50 pm

Re: [solved] Detecting touches outside stage boundary

Postby Magnesus » Sat May 26, 2012 1:28 pm

Sony Experia Arc S. Seems to be known problem although in touchscreen test application it behaves as it should, only in games it seems to have problems near the edges.
Magnesus
 
Posts: 1030
Joined: Sun Sep 25, 2011 3:50 pm


Return to Libgdx

Who is online

Users browsing this forum: AceEX, Bing [Bot], fran86, joaoneto, Zogger and 4 guests