Help I am making a custom cursor for a screen based game

Godot Version

3.5

Question

im using a simple script:

extends CanvasModulate

func _process(delta):
	$Arrow.global_position = get_global_mouse_position()

but i need to swap x and y because of some reason

You can directly set custom image for mouse cursor in project settings.
Go to [Project Settings]/display/mouse_cursor/custom_image

1 Like

Well for some reason, I cannot reproduce this issue.

im using a viewport to get 2d in 3d im using a custom blender model and im too lazy to remodle it cause i made this script

extends CanvasModulate

func _process(delta):
	# Get the global mouse position
	var mouse_position = get_global_mouse_position()
	
	# Set the Arrow's position with x and y swapped
	$Arrow.global_position.x = mouse_position.y  # Use mouse's y for Arrow's x
	$Arrow.global_position.y = mouse_position.x  # Use mouse's x for Arrow's y

for changing x and y but now i need to flip x so that if it doesnt have a - it should have a - if it does it shouldnt have an -

should i share project files?