Skip to content

Hi ! jumping and crouch aren't working.  #1

Open
@joshaabraham

Description

@joshaabraham

Hi, first thank for your tutorials. its very good.
bout the character 2d movement, here is a problem I meet, I effectivly press up and down arrows or 'w' and 's' ... or space (I've set everything right about the input), but the caracter dosen t jump or crouch. I put a Debug Log inside the if(Input.Get ... ) and it seems that my key are pressed. So I wonder what's going on.

see below

if (Input.GetButtonDown("Jump"))
{
Debug.Log("Jumped");
jump = true;
}
if (Input.GetButtonDown("Crouch"))
{
Debug.Log("Crouched");
crouch = true;
}
else if (Input.GetButtonUp("Crouch"))
{
crouch = false;
}

have you got any idea ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions