Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Design Question] simple jump input

Discussion in 'Input System' started by msh91, Nov 2, 2019.

  1. msh91

    msh91

    Joined:
    Apr 22, 2017
    Posts:
    37
    I have a component that handles jump, and it has 2 methods in it:
    - StartJump()
    - EndJump()

    Also, I have (1) a tooltip to explain to user how to jump, and (b) a tooltip to explain the user he can press the jump key longer to jump higher

    Right now, the only way I can think of to achieve it, is to create *4* actions:
    - JumpStart (for the component): with interaction press, trigger Press Only
    - JumpEnd (for the component): with interaction press, trigger Release Only
    - Jump (for tooltip a): with interaction press
    - JumpHold (for tooltip b): with interaction hold


    Is that a good design? is there a better way to do it? what do you guys recommend/suggest?