Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom mouse cursors using AtlasTexture are broken in 4.3 beta1 #92671

Closed
rob-williams opened this issue Jun 2, 2024 · 1 comment · Fixed by #92702
Closed

Custom mouse cursors using AtlasTexture are broken in 4.3 beta1 #92671

rob-williams opened this issue Jun 2, 2024 · 1 comment · Fixed by #92702

Comments

@rob-williams
Copy link

Tested versions

  • Reproducible in 4.3.beta1
  • This worked fine in previous 4.3 alpha versions

System information

MacOS Sonoma 14.4.1 - Godot v4.3.beta1 - forward_plus - vulkan

Issue description

In previous 4.3 (and 4.2, etc) builds, I could use an AtlasTexture to set a Texture2D value to be set as a custom mouse cursor with Input.set_custom_mouse_cursor. This no longer works, and the entire atlas is rendered on screen as the cursor.

See the attached video showing the problem.

Screen.Recording.2024-06-02.at.10.33.43.AM.mov

Steps to reproduce

  1. Set two exported Texture2D values using an AtlasTexture.
  2. Use those Texture2D values to set the default custom mouse cursor and the pointing hand custom mouse cursor using Input.set_custom_mouse_cursor.
  3. Run the project and see that the entire atlas is rendered as the mouse cursor, not just the texture selected within the atlas.

This picture shows the simple repro setup required:

Screenshot 2024-06-02 at 10 40 45 AM

The code to reproduce is also simple:

extends Control

@export var default_mouse_cursor: Texture2D
@export var pointing_hand_mouse_cursor: Texture2D


# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	Input.set_custom_mouse_cursor(default_mouse_cursor)
	Input.set_custom_mouse_cursor(pointing_hand_mouse_cursor, Input.CURSOR_POINTING_HAND)

Minimal reproduction project (MRP)

Just run this project to see the behavior
mouse-cursor-bug-repro.zip

@matheusmdx
Copy link
Contributor

Bisecting points to #88970 as the culprit:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Unassessed
Development

Successfully merging a pull request may close this issue.

3 participants