Forum rules - please read before posting.

Is it possible to say to AC to lock the cursor in place?

I would like to be able, using the controller, to move the cursor up to a Hotspot, interact with it and at that point disable it to allow the direct control for the Interaction menu. And I would use InteractionB to exit from the interaction menu, unlock the cursor and return to moving it with the controller. Would it be possible? I've tried disabling the cursor when entering the menu, but that equals to moving the cursor away from the Hotspot and prevents me from showing the interaction menu. I've tried to use the action Player Constrain and set the cursor lock to Enabled, but it doesn't seem to have any effect whatsoever. I'm kinda lost at the moment.

Comments

  • Does the Interaction menu pause the game? If so, check Directly-navigate Menus when paused? in the Menu Manage to allow for direct navigation when it's turned on.

    Otherwise, you'll have to use the Engine: Manage systems Action to allow for direct-control over gameplay menus at the moment the Interaction menu is turned on. See the Manual's "Navigating menus directly" chapter for details on this.

    To close the Menu when InteractionB is pressed, define an Active Input mapped to this input, and have it run an ActionList asset that uses the Menu: Change state Action to close the Interaction menu.

  • Sorry, I probably wasn't much clear in what I've already tried: I set Directly navigate Menus when pause from script at startup and that is working as expected. I've also set the game to pause when some menus are turned on and this too is working as expected.
    I've set the flag for direct control over gameplay to true through code and it is working, techincally. The inventory menu works perfectly, but the interaction menu is giving me a lot more headaches. I am technically controlling the menu directly, but moving the stick to select a menu option moves the cursor as wella and as soon as I move it outside the boudaries of an Hotspot the interaction menu disappear. Same happens if I just disable the cursor. I've tried to only lock the cursor in position, but the action Player >> Constain >> Lock Cursor doesn't seem to have any effect at all.

  • Currently, the simulated cursor remains unlocked while the game is paused.

    Does your Interaction menu pause the game?

    If so, try disabling this, and use the following to lock the cursor:

    AC.KickStarter.playerInput.forceGameplayCursor = AC.ForceGameplayCursor.KeepLocked;
    
  • It's a progress, but it seems to be locking the cursor at the center of the screen, while I need it to stay on the hotspot I interacted with in order to keep the menu opened. Is it doable?

  • I will include the ability to override the position of the locked cursor in the upcoming v1.74.0 update.

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.