Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

[Design Question] simple jump input

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

  1. msh91


    Apr 22, 2017
    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?