How to disable the offscreen elements of PC to appear when Fullscreen?

Godot Version

Godot v4.1.1

Question

I am so frustrated! I am on a Mac, I made the game fullscreen but when I look around enough over 360 degrees, the cursor goes “off screen” although it is fullscreen, and shows the title of the window if I go up with the cursor as I am rotating the camera in Game, it shows the lower bar with all my apps in the bottom of my screen when I take the cursor to the bottom. There is absolutely no one talking about this. I just need the game screen to be locked when full screen and not allow external interactions.

Relevant Code

func _ready() → void:
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) #hides the cursor
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN) #fullscreens

I hope someone can help!

UPDATE

Input.MOUSE_MODE_CAPTURED worked!!!

I think you’re looking for Input.MOUSE_MODE_CAPTURED in the docs. Or maybe CONFINED or CONFINED_HIDDEN.

Hi, I tried both, the same happens!

CAPTURED worked!!! I’m so happy!! Thank you so much, God bless you!!! I was getting SO extremely frustrated you have no idea.

1 Like

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