I want to use my drawn mouse cursor. But not pre-drawn, but drawn with GDScript. I know how to draw. My question is how to use it?
P.S.: I had an implementation for Godot 2.1. It works in 3.0 but causes braking (which is very strange).
My best bet would be:
Draw your mouse cursor in a Node2D, move it to your mouse position and hide the real mouse cursor.
Yes, that's how I did in Godot 2.1.X. but in 3.0 I faced the fact that it negatively affects the "response" of the interface. For example, pressing the button is processed with 10-20 attempts!
How do you position the cursor? In what method?
> For example, pressing the button is processed with 10-20 attempts!
Could you please share a sample project where you get this behaviour?
> How do you position the cursor? In what method?
The _input(event)-method of the root node should be fine. Asking for the InputEventMouseMotion and then set the Node2Ds position with Viewport.get_mouse_position() (see here).
I found the cause. No, it works right.
I inherited the "Control" node. After exporting to Godot 3.0, you had to set the parameter: "mouse.filter=Ignore". This was not a brakingon the interface. The reason is that my cursor overlapped the control below.
have you had problem with the cursors movement? because I want to do the same thing but when I go into fullscreen the game updates only 60 per second and the mouse cursor lags behind
Yes, there is a slight backlog of the sprite from the operating system cursor. But since the operating system cursor is hidden - it's not visible. This does not have a significant effect on the use of interfaces in game.