I've got a camera which uses the locomotion asset from the store and follows the camera.

I've made a UI with buttons on it which I wish to click but the camera is locked to the center, when I press esc and move the move it simply relocks to the center.

How can I make escape the mouse from the camera entirely after pressing a key to make it so I can handle UI elements. Here is my pseudo code:

// Update is called once per frame
void Update()
    if (Input.GetKeyDown(KeyCode.Space))
        Debug.Log("Camera will freeze");
        // UI Canvas displays
        // UI is interactable

For reference, the camera controller: https://assetstore.unity.com/packages/tools/animation/locomotion-system-7135

  • \$\begingroup\$ Could you please try and improve the quality of a question? Because right now it's hard to understand your situation. If you want to stop camera movements could stop them through code. By using plugin it makes your question very specific to the code of this plugin. It's hard to know how to disable it without understanding how that plugin works. Providing some code that drives camera movement will help. \$\endgroup\$ – Candid Moon _Max_ Feb 9 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.