Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Composite Binding with Modifier

Discussion in 'Input System' started by jpvanoosten, Jan 10, 2024.

  1. jpvanoosten

    jpvanoosten

    Joined:
    Nov 20, 2009
    Posts:
    50
    I'm using v1.6.3 and I want to create a Vector2 action with a composite action with WASD/Arrow keys but I can't find a way to create a composite binding with 1 modifier key.

    I can do this with the mouse since "Delta [Mouse]" allows for this, but how can I do this with WASD or arrow keys?
    upload_2024-1-10_15-34-51.png

    I want to create a binding like this:
    Modifier: Control [Keyboard]
    Binding: Up/Down/Left/Right Composite
    Up: Up Arrow [Keyboard]
    Up: W [Keyboard]
    Down: Down Arrow [Keyboard]
    Down: S [Keyboard]
    Left: Left Arrow [Keyboard]
    Left: A [Keyboard]
    Right: Right Arrow [Keyboard]
    Right: D [Keyboard]


    If it is not possible to do this in an InputActionAsset, then what would be the best way to achieve this?

    Thanks in advance!
     
    Last edited: Jan 10, 2024
  2. jpvanoosten

    jpvanoosten

    Joined:
    Nov 20, 2009
    Posts:
    50
    Or is there a "2D Vector with One Modifier" binding or a WASD/Arrow composite binding that can be used with the "One Modifier" binding? Or can I create one?