Only set the mouse mode in the pause menu when it's being shown. Not in the _ready() function. I do this in the pause menu's _input() function which looks for a "pause" action and shows itself while also pausing the scene tree. If you put it in the ready, the player script and the pause menu script will be fighting over the mouse mode and the last one will win.
#Need help with "uncapturing" the mouse when in pause mode.
14 messages · Page 1 of 1 (latest)
Would you be able to show an example of a script like that?
Never mind i get it now, thanks!
Need help with "un"capturing the mouse when in pause mode.
Need help with "uncapturing" the mouse when in pause mode.
Well, it kinda works? It works in the pause menu but it wont work ingame.
func _input(InputEvent):
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
I need to fix the obs settings since i just downloaded it now lol
The lag is pretty hard to look at
But small explanation that the mouse will kinda work ingame but it will not be locked.
I almost fixed it with this piece of code
func _input(event):
if event.is_action_pressed("pause"):
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
In pause menu script
I know that im talking to nobody right now but if anyone sees this then im just showing what im learning since i just started with Godot.