Page 1 of 2

one touch disappears when approaching to another

Posted: Mon Mar 29, 2021 11:48 pm
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:

Re: one touch disappears when approaching to another

Posted: Tue Mar 30, 2021 12:48 am
by darkfrei
Disappears it in the touch-01 too?
viewtopic.php?f=4&t=90678&p=239613#p239611

Re: one touch disappears when approaching to another

Posted: Tue Mar 30, 2021 9:05 am
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

Re: one touch disappears when approaching to another

Posted: Tue Mar 30, 2021 9:18 am
by Nikki
Do you have like a minimal working example of the issue ?

as in some code?

Re: one touch disappears when approaching to another

Posted: Tue Mar 30, 2021 10:00 am
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

Re: one touch disappears when approaching to another

Posted: Tue Mar 30, 2021 10:20 am
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?

Re: one touch disappears when approaching to another

Posted: Tue Mar 30, 2021 2:39 pm
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?

Re: one touch disappears when approaching to another

Posted: Tue Mar 30, 2021 2:50 pm
by bigbruhh0
ok , i checked minimal distances by your example :
horizontal : about 110 px
vertical: about 80 px
diagonal: about 70 px

Re: one touch disappears when approaching to another

Posted: Tue Mar 30, 2021 2:59 pm
by bigbruhh0
i get different results every time,
I'm confused xD

Re: one touch disappears when approaching to another

Posted: Tue Mar 30, 2021 4:13 pm
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.