I know this question has been asked and answered before but in my case, the answers just won't cut it. No answer I have looked at before was able to solve this and even in the Unity forum, I couldn't find useful information. In Unity, I'm trying to build a 2D game, nothing big.
I am trying to set up my movement-script and horizontal movement worked like a charm. But jumping does not work, at least when the button is assigned to Space. Here is my code so far:
void Update() {
if (Input.GetButtonDown("Jump")) {
Debug.Log("Jump!");
rigidBody.velocity = new Vector2(rigidBody.velocity.x, jumpSpeed);
}
}
It is -as you can tell- really simple. I tried to assign another key to Jump. With the E button everything went fine and my character jumped. But when using the Space, it did not work. Here's an image of my input manager:
Notice that I don't have a second Jump option configured. This was where I used the E key.
(I am using Linux Mint Tricia 19.3 if that gives any further information)
