Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Godot_Starter |
Is there a way how I can simulate a mouseclick per code, so there is no real mouseclick but it is dealt like a mouseclick on a specific position. (in a 2d game)
For example: I want to simulate a left mouse button click on the position Vector2(500,500). And if there is a button it gets pressed exactly how it would be when I press there with the real mouse.
IMHO this question is good guidance on your problem. Organizationally all mouse clicks should just call a single function, so you should be able to call that function from elsewhere without a mouse click.
DDoop | 2020-07-17 22:06