I have a little cube that jumps and moves but when it jumps it falls down too slowly. How can i make it fall down faster while still jumping as high?

playerController script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerController : MonoBehaviour
{
private Rigidbody playerRb;
public float speed;
public float jumpForce;

// Start is called before the first frame update
void Start()
{
    playerRb = GetComponent<Rigidbody>();  
}

// Update is called once per frame
void FixedUpdate()
{
    float horizontalInput = Input.GetAxisRaw("Horizontal");
    playerRb.velocity = new Vector2(horizontalInput * speed, playerRb.velocity.y);
}

private void Update()
{
    if (Input.GetButtonDown("Jump"))
    {
        playerRb.AddForce(Vector3.up * jumpForce, ForceMode.Impulse);
    }
}

}

You can increase the gravity settings by going in the Unity Editor, look at the menu at the top, Edit → Project Settings → Physics → (at the top) Gravity and you can increase its value.


I would recommend setting the y velocity of your rigidbody when jumping. For example:

public float JumpForce;

void Update()
{
    if (Input.GetButtonDown("Jump"))
    {
        playerRb.velocity = new Vector3
        (
            playerRb.velocity.x,
            playerRb.velocity.y * JumpForce,
            playerRb.velocity.z
        );
    }
}

This would ensure your jump height isn’t dependant on the mass of your object.

@Emile123