I need help with jumping :(

I need a jump script that i can understand, this is like the outline of my movement scripts, and i want a jump one to look similar.

if(this.app.keyboard.isPressed(pc.KEY_W)){
        this.entity.rigidbody.applyForce(
            10,
            0,
            0
        );
    
    }

Hi @Dominic and welcome!

You can modify the force and axis to achieve the desired result. Below an example.

if (this.app.keyboard.wasPressed(pc.KEY_SPACE)){
    this.entity.rigidbody.applyImpulse(0, 10, 0);
}

For more help about jumping I suggest to search on the forum first, because there are a lot of topics about it.

2 Likes

Thanks You.