Resuming from pause state locks the new textured reticle

Godot Version

Godot 4.2.1


I created a reticle as a replacement for the player’s mouse, however if the player pauses the game and then presses the Resume button then the reticle is locked in place. If you move the mouse in a direction you can see it try to move that direction but immediately snap back on the next available frame. Please let me know if any additional information needs to be provided, I tried taking a video but my OBS kept crashing with Godot. It’s weird, if I alt+tab out of the game while it is running and then I mouse over the game the reticle will move and follow the mouse position.

extends Node2D

@onready var menu = $CanvasLayer/pauseMenu
@onready var heartsContainer = $CanvasLayer/heartsContainer
@onready var player = $TileMap/player

var paused = false

func _ready():

func _process(delta):
    if Input.is_action_just_pressed("pause"):
func pause(state):
    if state:
        get_tree().paused = false

        get_tree().paused = true
    paused = !paused

extends Control

func _ready():
    # Hide the system cursor

func _process(delta):
    # Update the cursor position based on the mouse position
    var rect_position = get_global_mouse_position()
    custom_minimum_size = Vector2(1, 1)  # Set a minimum size to avoid scaling issues
    size = custom_minimum_size
    rect_position.x -= size.x * 0.5
    rect_position.y -= size.y * 0.5
    global_position = rect_position

extends Control

@onready var main = $"../../"

var paused = false

func _on_resume_pressed():
    print_debug("Resume pressed")

func _on_controls_pressed():
    pass # Replace with function body.

func _on_quit_pressed():
    print_debug("Quit pressed")


I could only include one image in the post, so here is the pauseMenu tree


there’s a way by setting it via project settings and even from script if you want to set custom cursor like explained here Customizing the mouse cursor — Godot Engine (stable) documentation in English

Wow! The tutorial I was watching must have been outdated.

Thank you SO much!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.