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

[Design Question] simple jump input

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

  1. msh91

    msh91

    Joined:
    Apr 22, 2017
    Posts:
    40
    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?