MOUSE_MODE_CAPTURED has bugs

Godot Version

Godot 4.3-stable`

Bug Found

I was using a basic movement script for a characterbody 3d and I tried to add the mouse capture code. It seemed fine in the script editor but when I launched the game it gave errors in that line for some reason. I checked the code and it was alright but it just kept happening. I restarted the editor and it worked fine again and the bug was fixed.

Does anyone know why this happens??

What was the error? What was the code?

1 Like

Try use Input.mouse_mode = 2

It was just shown in red like how it shows when the code is written wrong. The code was Input.set_mouse_mode(MOUSE_MODE_CAPTURED).
I might have written it wrong here but it was right in godot

It should be Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)

It was that

It was just shown in red like how it shows when the code is written wrong.

There will usually be a more detailed error message in the panel below the code editor.

1 Like

I didn’t really check that much