Search Unity

How to disable joystick/keyboard from interacting with dialogs in Unity UFPS

Discussion in 'Editor & General Support' started by paphus, Apr 13, 2021.

  1. paphus

    paphus

    Joined:
    Dec 12, 2019
    Posts:
    6
    I am developing a 3D game with a custom chat console using Unity and UFPS, https://assetstore.unity.com/packages/tools/game-toolkits/ufps-ultimate-fps-106748

    Everything is working, but running on Android TV with a joystick, keyboard and mouse we want to control which input affects what.

    So we want the dialog to only be able to interact with the mouse. and the joystick to only interact with the game/player.

    Original the mouse was controlling the players looking, and able to select the dialog. I was able to disable the mouse from controlling the player by,

    Unity menu, Edit, Project Settings, Input

    Then finding the "Mouse X" and Mouse Y" input events and renaming the ones with the mouse input to "Mouse XX", and leaving the joystick axis events for "Mouse X" so the joystick can still control the players looking.

    Now I am having the opposite issue, the joystick and the arrow keyboard keys are toggling the selection in the dialog, and the joystick button/space key trigger selection in the dialog. I want to disable this so only the mouse can interact with the dialog and the joystick on controls the player movement.

    I tried changing the Input for "Horizontal" "Vertical" by renaming to "Horizontal xxx". This works, but then the joystick is also not controlling the player movement. So how can I make these separate events. I cannot find any code listening to "Horizontal" or "Vertical" events, these seem to be hardwired in Unity some how??
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,914
    This is configured in your Input Module, which should be a component on your EventSystem by default. You can choose which axis controls UI navigation.
     
  3. https://forum.unity.com/threads/rel...ller-ufps-2-third-person-controller-2.533637/
     
  4. paphus

    paphus

    Joined:
    Dec 12, 2019
    Posts:
    6
    So how to configure this in Unity 2018?
    I have already tried to configure, "Unity menu, Edit, Project Settings, Input"
     
  5. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,914
    The Input Module is a component on the EventSystem GameObject.
     
  6. paphus

    paphus

    Joined:
    Dec 12, 2019
    Posts:
    6
    Okay, thanks. The solutions was to uncheck "Send Navigation Event" (and also removing setting this to true in code)