Forum rules - please read before posting.

Disabling free-aiming with Player Constrain while using UFPS

While fiddling around with AC (Keyboard and Controller) and UFPS, I noticed that when using Player: Constrain, disabling free-aiming has no effect because Mouse X and Mouse Y are not renamed to CursorHorizontal en CursorVertical.

What I’d like to achieve is (not pausing gameplay): player presses button (Inventory or maybe Use), run Action List, open Inventory, constrain Player, disable free-aiming and direct contol the inventory. From there I’d like to expand it more, but let’s start with this.

After renaming Mouse X and Mouse Y to CursorHorizontal en CursorVertical in the Input Manager, and in the UFPS Input Manager, and in the script ‘vp_FPInput.cs’, the result is however that opening the inventory does unlock the cursor, but free-aiming is still possible. So both camera and cursor move. I had a search through the UFPS scripts, but couldn’t find anything else using Mouse X or Mouse Y.

I also followed the ‘Creating a first person game Tutorial’, where Mouse X and Y are renamed very early on, and UFPS is added at the end. I was wondering how it’s set up there, especially constraining free-aim throught an Action List while using UFPS?

Comments

  • You're referring to "legacy" UFPS?

    UFPS uses its own inputs for free-aiming, so you should probably have both Mouse X/Y and CursorHorizontal/Vertical inputs defined in your Input Manager.

    Free-aiming in this mode is handled by UFPS - try looking for the vp_FPInput script's MouseCursorForced property.

    AC's UltimateFPSIntegration script, which will need to be attached to your Player, should update this property automatically based on AC's own cursor lock state - which can be set with the Player: Constrain Action.

    Another way to test this cursor lock manually is to go into the GameEngine object's Player Input component and configure the Force Gameplay Cursor field.

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.