one touch disappears when approaching to another

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
bigbruhh0
Prole
Posts: 17
Joined: Fri Mar 26, 2021 10:36 pm
Location: Russia
Contact:

one touch disappears when approaching to another

Post by bigbruhh0 »

Hello again! :awesome:
i got a problem with controlling two objects at the same time with touches
when I bring these points to each other, one touch disappears
is it possible to fix it somehow?

there seems to be no errors in the code itself, I can briefly describe the control algorithm:
  • we go through the touches
  • go through the list of objects
  • find the closest to the touch and assign it the ID of the parent
  • then we assign x and y to the object of touch by id
maybe someone has a source with a code where such a problem does not occur?

the examples from my last post have the same problem, so I don't even know if it is possible to fix it
viewtopic.php?f=4&t=90678&p=239613#p239613
Image
I'm just tired of coding, I wanted to draw something :rofl: :rofl:
in love with love2d
User avatar
darkfrei
Party member
Posts: 1174
Joined: Sat Feb 08, 2020 11:09 pm

Re: one touch disappears when approaching to another

Post by darkfrei »

Disappears it in the touch-01 too?
viewtopic.php?f=4&t=90678&p=239613#p239611
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
User avatar
bigbruhh0
Prole
Posts: 17
Joined: Fri Mar 26, 2021 10:36 pm
Location: Russia
Contact:

Re: one touch disappears when approaching to another

Post by bigbruhh0 »

darkfrei wrote: Tue Mar 30, 2021 12:48 am Disappears it in the touch-01 too?
viewtopic.php?f=4&t=90678&p=239613#p239611
Yes
in love with love2d
User avatar
Nikki
Citizen
Posts: 83
Joined: Wed Jan 25, 2017 5:42 pm

Re: one touch disappears when approaching to another

Post by Nikki »

Do you have like a minimal working example of the issue ?

as in some code?
User avatar
bigbruhh0
Prole
Posts: 17
Joined: Fri Mar 26, 2021 10:36 pm
Location: Russia
Contact:

Re: one touch disappears when approaching to another

Post by bigbruhh0 »

darkfrei wrote: Tue Mar 30, 2021 12:48 am Disappears it in the touch-01 too?
viewtopic.php?f=4&t=90678&p=239613#p239611
code is the same as in this example
in love with love2d
User avatar
darkfrei
Party member
Posts: 1174
Joined: Sat Feb 08, 2020 11:09 pm

Re: one touch disappears when approaching to another

Post by darkfrei »

bigbruhh0 wrote: Tue Mar 30, 2021 9:05 am
darkfrei wrote: Tue Mar 30, 2021 12:48 am Disappears it in the touch-01 too?
viewtopic.php?f=4&t=90678&p=239613#p239611
Yes
It looks like the limit by the touch screen resolution. Is the shortest line between touches of two fingers diagonal or vertical/horizontal?
Attachments
touch-02.love
(855 Bytes) Downloaded 179 times
Last edited by darkfrei on Tue Mar 30, 2021 4:09 pm, edited 4 times in total.
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
User avatar
bigbruhh0
Prole
Posts: 17
Joined: Fri Mar 26, 2021 10:36 pm
Location: Russia
Contact:

Re: one touch disappears when approaching to another

Post by bigbruhh0 »

darkfrei wrote: Tue Mar 30, 2021 10:20 am
bigbruhh0 wrote: Tue Mar 30, 2021 9:05 am
darkfrei wrote: Tue Mar 30, 2021 12:48 am Disappears it in the touch-01 too?
viewtopic.php?f=4&t=90678&p=239613#p239611
Yes
It looks like the limit by the touch screen resolution. Is the shortest line between touches of two fingers diagonal or vertical/horizontal?
i dont know for sure, and i cant imagine how to check it , i think shortest lines for vertical/hor/diag are same
I asked my friends to check it, they also have this problem
did you have this when you ran your example touch-01?
in love with love2d
User avatar
bigbruhh0
Prole
Posts: 17
Joined: Fri Mar 26, 2021 10:36 pm
Location: Russia
Contact:

Re: one touch disappears when approaching to another

Post by bigbruhh0 »

ok , i checked minimal distances by your example :
horizontal : about 110 px
vertical: about 80 px
diagonal: about 70 px
in love with love2d
User avatar
bigbruhh0
Prole
Posts: 17
Joined: Fri Mar 26, 2021 10:36 pm
Location: Russia
Contact:

Re: one touch disappears when approaching to another

Post by bigbruhh0 »

i get different results every time,
I'm confused xD
in love with love2d
User avatar
darkfrei
Party member
Posts: 1174
Joined: Sat Feb 08, 2020 11:09 pm

Re: one touch disappears when approaching to another

Post by darkfrei »

bigbruhh0 wrote: Tue Mar 30, 2021 2:59 pm i get different results every time,
I'm confused xD
Try the touch-02 viewtopic.php?f=4&t=90713&p=239686&sid= ... 91#p239686

On the 10" tablet I've got the shortest line between touches about 27-50 pixels.
Attachments
Screenshot_20210330-181117.png
Screenshot_20210330-181117.png (54.25 KiB) Viewed 5034 times
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Semrush [Bot] and 163 guests