You might want to change the appearance of the mouse cursor in your game in order to suit the overall design. There are two ways to customize the mouse cursor:

Using project settings

Using a script

Using project settings is a simpler (but more limited) way to customize the mouse cursor. The second way is more customizable, but involves scripting.

Note

You could display a “software” mouse cursor by hiding the mouse cursor and
moving a Sprite to the cursor position in a _process method, but this
will add at least one frame of latency compared to an “hardware” mouse
cursor. Therefore, it’s recommended to use the approach described here
whenever possible.

If you have to use the “software” approach, consider adding an extrapolation step
to better display the actual mouse input.

extendsNode# Load the custom images for the mouse cursor.vararrow=load("res://arrow.png")varbeam=load("res://beam.png")func_ready():# Changes only the arrow shape of the cursor.# This is similar to changing it in the project settings.Input.set_custom_mouse_cursor(arrow)# Changes a specific shape of the cursor (here, the I-beam shape).Input.set_custom_mouse_cursor(beam,Input.CURSOR_IBEAM)

publicoverridevoid_Ready(){// Load the custom images for the mouse cursor.vararrow=ResourceLoader.Load("res://arrow.png");varbeam=ResourceLoader.Load("res://beam.png");// Changes only the arrow shape of the cursor.// This is similar to changing it in the project settings.Input.SetCustomMouseCursor(arrow);// Changes a specific shape of the cursor (here, the I-beam shape).Input.SetCustomMouseCursor(beam,Input.CursorShape.Ibeam);}