Forum rules - please read before posting.

Letting the player walk using any cursor option

Hi, I wanted to ask if there is an option to allow players to walk around a scene with point-and-click controls using any cursor option. You can do this with the inventory cursor so wanting to do that for when players are using the USE/PICK/LOOK AT options to help improve the QOL in my game.

Comments

  • It may be that a simple custom script can handle this. The exact method, however, would be based on your settings.

    Could you share a screenshot of your Settings Manager's "Interface" panel, as well as your AC/Unity versions?

  • on Unity 2020.3.45f1 using version 1.75.4 of AC toolkit
    https://imgur.com/a/9v3KQaX

  • You can attach this script (AnyCursorWalk.cs) to your scene to get this behaviour:

    using UnityEngine;
    using AC;
    
    public class AnyCursorWalk : MonoBehaviour
    {
    
        void Update ()
        {
            if (KickStarter.playerInput.GetMouseState () == MouseState.SingleClick)
            {
                if (KickStarter.playerInteraction.GetActiveHotspot () == null &&
                    KickStarter.playerCursor.GetSelectedCursorID () >= 0 &&
                    !KickStarter.playerMenus.IsMouseOverMenu ())
                {
                    KickStarter.playerMovement.ProcessPointAndClick (KickStarter.playerInput.GetMousePosition (), false);
                }
            }
        }
    
    }
    

    This requires the latest AC version, however. If you can't upgrade your project, import the latest release from the Package Manager into a new project, and copy over the PlayerMovement script's ProcessPointAndClick function into your own project's copy.

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.