Forum rules - please read before posting.

Cursor Locking Constrains Player Movement

The manual suggests this is possible, but I am having a hard time executing it (I've been attempting it with Active Inputs).

Is it possible to enable and disable player movement constraints with the cursor locking toggle in first-person mode? This way the player can't just walk around while trying to use the HUD or click on something specific.

There's no way to check if the cursor is locked in an action list to tell whether to enable or disable, so I have no idea how this would be done.

Comments

  • Which part of the Manual are you referring to?

    Instead of invoking the ToggleCursor input, have an Active Input that calls the Player: Constrain Action to control both player movement and free-aiming.  Disabling free-aiming will automatically unlock the cursor.

    At the same time, you can set the value of a boolean Variable to keep track of whether you've disabled free-aiming or not.  You can then begin the ActionList with a Variable: Check Action to determine if you need to disable or enable it.
  • I'd considered a variable but didn't think to check free-aiming. You are a saint yet again, Chris.

    As for the manual, I'm referring to the note at the bottom of page 67:

    "NOTE: Enabling direct Menu navigation during gameplay doesn’t disable Player
    movement automatically. This should generally be done in conjunction with the Player:
    Constrain Action so that you only control either Menus or the Player at any one time."
  • try

    KickStarter.playerInput.SetFreeAimLock(true or false);


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.