Question about right clicking and Touch behavior

0 favourites
  • 3 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • I made a game a while back that was intended for a touch device, so (obviously) I made heavy use of the Touch behavior to handle inputs. Recently, I made the game available to non-touch devices via browser, which seemed like it would be an easy translation since Construct 2 allows left clicking on the mouse to behave as a touch input.

    You can play the game here:

    However, one of my friends came across an interesting bug. If you right click instead of left click, it seems as though it treats that as a different sort of input (maybe a tap instead of a touch that can be dragged?). When one of the four seed bags in the corners are "touched", they spawn a flower that can be dragged onto the field. If the flower is spawned and dropped outside of the field, it should be destroyed.

    This works as expected with a left click, but when you right click, it spawns a flower and immediately drops it, but doesn't destroy it. This is unexpected behavior.

    It's been a few months since I looked at the project, so I'm not excited about going through and updating all the events to explicitly use Mouse inputs when on a non-touch device. If I have to do that in the end, I suppose that's fine, but I'm curious to learn more about why this problem is a problem. Is right clicking supposed to behave differently on Touch events than left clicking, or is this some sort of bug? Personally I feel like it either shouldn't accept right clicks at all or treat them exactly the same as left clicks.

  • Thats because you are using drag & drop behavior. Use touch 'is touching object' as conditin then set position to Touch.X, Touch.Y.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Cool, I'll try that. My question still stands though: Is right click treated as a "tap" instead of a hold (like left click seems to be)?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)