Search Unity

Amateur Questions: New Input System And A Player Manager

Discussion in 'Input System' started by SystemId, Apr 14, 2019.

  1. SystemId

    SystemId

    Joined:
    Aug 5, 2016
    Posts:
    11
    Sorry in advance for some of the Amateur questions :( , but I just started using the New Input system and I want to learn the correct Process for setting up my controls in my Player Manager script.

    After several tutorials, I setup my basic controls. I setup a couple of control schemes.
    I setup a couple of Action Maps. My current test game is just a standard 2d rpg. I have a few questions that I hope would only take a minute for somebody with experience to answer:

    Questions
    1) Whats the proper way to basically change which Action Map the player is using? I made several Action Maps for stuff like: Standard Walking and Interacting, Status Menu, NPC Dialogue.

    currently my walking controls are just called like this:

    private void Awake() {
    controls.playerControls.Accept.performed += acceptCtx => Accept();
    controls.playerControls.Cancle.performed += cancleCtx => Cancle();


    controls.playerControls.Movement.performed += moveCtx => Movement(moveCtx.ReadValue<Vector2>());
    controls.playerControls.Movement.cancelled += moveCtx => Movement(Vector2.zero);

    }

    but what do I do when I am talking to someone and I want to switch my Action Map to a Dialogue Action Map?

    2) Should I even be making all these Action Maps for pretty much any menu change?

    3) I seem to be having some problems reading the Leftstick on a gamepad. I added a couple of Processes:
    Stick Deadzone, and Axis Deadzone, but my character still keeps running off in a direction.

    It works fine with the Dpad, even though it feels a little clunky compared to the old Input system. I can't put my finger on why though.


    Any help for a newbie is most welcome. :)