Simulate Touch at a Position or Disable Cursor completely

Id like a way to simulate a touch on the screen so i can move the invisible cursor, or a way to completely kill any and all interaction the cursor can have.

The reason for this is that on booting up the game, theres a small window where the events havent been triggered yet, but the game is running.

So for a brief second, even if you have the action to deactivate moving the mouse cursor with touch, the player can still move it once, which causes major issues…

Considering that the cursor stays in its last position, even through scene changes, if the player taps a place where theres gonna be a button, then that button will forever trigger untill you reload the game and dont touch the screen right away…

Id like to make some sort of safeguard where if the mouse was moved in that little window at the start, i could reposition it at the beginning of the next scene or even have some event always running keeping the cursor at 0x 0y, some sort of “touch simulation”, or just straight up kill any cursor interaction if at all possible.

EDIT: Forgot to mention that i have the deactivate moving the mouse with touches action on an event at the beginning of every scene, including the very first scene, its one of the very first events that i trigger. I had already thought something like this could happen so i tried to bullet proof it as much as possible.

1 Like

The issue you are describing doesn’t match up with how touch input normally behaves unless conditions are missed when using mouse emulation (single touch design) or single touch conditions/actions are being used when multitouch is probably a better fit.

Could you show some examples of how your touch input events set up?

For example, Are you using the “touch/cursor is over object” condition alone? Normally that’s meant to be combined with “touch is down or mouse button clicked” below it in the same event to ensure that it only fires when a tap happens. (These are both single touch/mouse emulation conditions, which is why I want to check)

1 Like

Ohhh!! I didnt know that… and yes, i was using the “touch/cursor is over object” condition alone. At the start of the scene i was disabling moving the cursor to make it only trigger when the button was pressed.

Ill add in the “touch is down…” condition to it and see how it goes.

From a bit more testing, what i found was that the issue is with the very first Scene.

The first scene the game loads up takes a moment to load up the events, even the ones that state at the beginning of the scene.

My way around this, was to make an empty balckedout scene to use as the starting scene, and all that one does, is set the resolution and boot you to the actual “first scene”, doing this makes it so that everything works properly.

Using only the “Touch/cursor is over object” paired with deactivating moving the mouse was working fine, the issue was just that “dead moment” where you were able to move the cursor because the events were still loading or something…

Thanks again @Silver-Streak ! Ill add in the condition you mention to make sure no funny buisness happens! :smiley:

1 Like

Facepalm …i feel so stupid…

When i wanted to make mobile controls and my character was acting weird, i looked it up, and plenty of people were having the same issue of their characters being stuck running after pressing a button…

…the cure all solution was just to disable moving the cursor with touch… and that kinda works, in fact, if i wasent always trying to break my games and find bugs, i wouldnt have noticed the big flaw in this…

…the actual solution is so simple… theres an actual behavior that you can use on your buttons to turn them into a virtual gamepad for touchscreen… it makes eveything so much easier and simple to use… Im so annoyed…

…but i supose i learned a lot from this, specially the how to use single touch the right way…

Everything works now, no matter how hard i try to break it :smiley:


Its just a hunch but create a sprite and place it at the place where you want touch to be detected. Then:
At the beginning of the scene → hide sprtite
Touch is on sprite → (whatever action you want here)

That isnt the issue… the issue is, even if you have “deactivate moving cursor with touch” at the beginning of the scene, theres a moment after a loading screen, where your able to still move the cursor, and if you do, then theres no “action” that lets your reset the cursor position.

But its fine, i worked it out.