#Need help with "uncapturing" the mouse when in pause mode.

14 messages · Page 1 of 1 (latest)

frigid yarrow
#

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.

verbal blade
#

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.

verbal blade
#

func _input(InputEvent):
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE

verbal blade
#

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.

verbal blade
#

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

verbal blade
#

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.