Search Unity

Help me! Solution for double jump for character 2d

Discussion in 'Visual Scripting' started by bi1882001, Sep 11, 2022.

  1. bi1882001

    bi1882001

    Joined:
    Apr 19, 2020
    Posts:
    1
    Hello and sorry for my English.
    I'm beginning. I'm trying to create a double jump feature.
    My logic is:
    - Jump method called in FixedUpdate
    - The method to assign _canJump = true and GetButtonDown, called in Update method
    Everything is good for a single jump, but double jump not working.
    This is my solution. It looks very bad.
    upload_2022-9-11_11-45-44.png
    upload_2022-9-11_11-46-4.png
    upload_2022-9-11_11-46-30.png
    upload_2022-9-11_11-46-57.png
    Someone can give me a solution for this.
    I want everything related to physics placed in FixedUpdate.
    Thanks.