godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.32k stars 21.24k forks source link

Custom mouse cursor resets to system cursor (macOs) #98702

Open Mammon333 opened 3 weeks ago

Mammon333 commented 3 weeks ago

Tested versions

v4.3.stable.official.77dcf97d8

System information

Godot v4.3.stable - macOS 14.2.0 - Vulkan (Forward+) - integrated Apple M2 Max - Apple M2 Max (12 Threads)

Issue description

The custom mouse cursor only appears for a brief moment, before changing back to the system cursor.

This happens in window mode and fullscreen.

I followed this Godot documentation to implement the custom cursor image (32x32 .png) via a script but the same behavior happens, when the cursor image is implemented via the project settings under _display/mouse_cursor/customimage.

Script:

extends Node2D

var arrow_image = load("res://custom_cursor.png")

func _ready() -> void:
    Input.set_custom_mouse_cursor(arrow_image)

https://github.com/user-attachments/assets/84615648-6a81-46f6-94e3-4e1ef870c456

Steps to reproduce

  1. Create a new scene and give the main node a script.
  2. Use Input.set_custom_mouse_cursor() to change the cursor image.
  3. Run the project
  4. Wait for about half a second and the cursor changes back to the system cursor.

Minimal reproduction project (MRP)

custom_cursor_bug.zip

Mammon333 commented 3 weeks ago

Well, after some trial and error, I found out, this was actually an OS bug and had nothing whatsoever to do with Godot. Sorry (Closed)