Forum rules - please read before posting.

Unlock Cursor with Keyboard Input

Hi, I am creating a 1st person game where the cursor is locked in the center of the screen and used to free aim and control the direction of the player's camera.

I want to use a keyboard input to unlock the cursor so the player can interact with the inventory. I want the same button to lock the cursor in the center of the screen again.

How can I achieve this function?

Thank you for your time and diligence with this matter!

Comments

  • Define an input named "ToggleCursor" to switch between your cursor's locked state during gameplay.

    A full list of available inputs can be found in the "Available inputs" panel of the Settings Manager, as well as the Manual's "Input descriptions" chapter.

    Where you define new inputs is based on your project's Input handling. If you're using Input Manager, you can access them from your Project settings. If Input System, it'll be the Controls asset that AC creates when installing the Input System Integration template in the New Game Wizard.

  • THANK YOU! This worked!

    I was trying to change the Input Manager settings, but when I accessed the Input System's Control Asset and added "ToggleCursor" it worked!!

    Thank you again!!!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.