+2 votes

I have a 3D scene that uses the mouse cursor to control the camera, and there is a circumstance where I would like to permit the mouse to be used when I have a 2D component (in this case, a future world map) when its displayed on screen via hide/show toggle. What's the best approach to accomplishing this?

The 3D context taking the current mouse usage is a KinematicBody object, via the following calls in _ready():


This method is based on the 3rdperson-godot project, and the 2d context is just a Panel.

in Engine by (63 points)
retagged by

The best solution involves unlocking the mouse using Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) http://docs.godotengine.org/en/latest/classes/class_input.html?highlight=set_mouse_mode
I don't know how the 3rdperson-godot is setup, but FPS locking is basically done using this function.
You probably need to do more than that though, because even when unlocked the mouse might still control the camera.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.