pete1 0 Report post Posted April 23, 2019 I want to be a touch-like game, the pointerover on the mobile side has no effect. Quote Share this post Link to post Share on other sites
pete1 0 Report post Posted April 23, 2019 I do not know what to do Quote Share this post Link to post Share on other sites
ivan.popelyshev 1078 Report post Posted April 23, 2019 Please provide more information , my telepathy doesn't work on the words you wrote. @themoonrat is our pointer-master Quote Share this post Link to post Share on other sites
themoonrat 105 Report post Posted April 23, 2019 There is no such thing as pointerover for touch. It's the equivalent of mouseover, where you hover the cursor over an area but don't select it. Touch doesn't have that. Either you've pressed it or not. Quote Share this post Link to post Share on other sites
Exca 122 Report post Posted April 23, 2019 You can use touchstart and touchend to track if user is holding down. Or pointerdown and pointerup. Quote Share this post Link to post Share on other sites
pete1 0 Report post Posted April 24, 2019 Thank you, this is a drag connection, the original mouse enters the phone to determine whether to connect, but the pointerover mobile is invalid, I get the local coordinates through e.data.getLocalPosition when pointermove To judge whether to enter the phone, maybe this is not the best solution. Nice day Quote Share this post Link to post Share on other sites
pete1 0 Report post Posted April 24, 2019 This is really not a good idea, but I have no other good way. Quote Share this post Link to post Share on other sites
botmaster 27 Report post Posted April 24, 2019 You need to choose your words carefully, "the original mouse enters the phone to determine whether to connect" doesn't mean much because: 1. there's no mouse to use on a phone 2. "the mouse enters the phone" doesn't mean anything to us. It might be very clear for you but it really means nothing for us. 3. "to determine whether to connect". Again, this might be very obvious for you but it really doesn't mean anything for anyone who doesn't know what your app is supposed to do. As Ivan said it first, telepathy doesn't work here, we don't know what you are talking about because we don't know what your app does. Quote Share this post Link to post Share on other sites
ivan.popelyshev 1078 Report post Posted April 24, 2019 > As Ivan said it first, telepathy doesn't work here, I mean sometimes it works but not in this case, sorry Quote Share this post Link to post Share on other sites
pete1 0 Report post Posted April 25, 2019 In the color doll pointerdown, then pointermove, when the pointerover phone Sprite, confirm the connection, there is no pointerover on the mobile side, I would like to know if there is a better alternative method, I am deeply sorry, maybe my expression is not clear, maybe it is my Google Translation does not work accurately, thank you for your patience. Quote Share this post Link to post Share on other sites
pete1 0 Report post Posted April 25, 2019 patient Reply Quote Share this post Link to post Share on other sites
botmaster 27 Report post Posted April 25, 2019 using a pointermove event it's fairly simple to check if an area contains the pointer coordinates, could be a hitarea, a rectangle you set, ect ... So set your "phone" areas, when moving check if those areas contain the pointer coordinates and voila. Quote Share this post Link to post Share on other sites
trusktr 1 Report post Posted January 12 (edited) pointerover (and similar events) work on mobile when the finger is down, but you must opt into that behavior. For example, once `pointerdown` fires, if you move your finger, you can use `pointerover` as it moves onto different elements. See here for details: https://github.com/w3c/pointerevents/issues/346 Here is a demo that works on mobile (drag with your finger starting on the cell on which the cube is): https://cdpn.io/trusktr/debug/eYdPOKb Edited January 12 by trusktr Quote Share this post Link to post Share on other sites