Help for a newbie

Godot Version

Godot 4

Question

Can someone help, I’m trying to make a character2d sprite movement using the built in script but what I want is to have the sprite bounce a set height without the need for the jump button pressed but then bounce higher when it is.

I’ve tried adding a variable called bounce and using as bounce=+ vector2*delta but not getting anywhere!

Thanks all.

I physics_process check if the player is on ground
If that’s the case then check if the player is pressing the jump button and apply the corresponding force
If that’s not the case then do nothing

bounce += vector2*delta

try flipping the signs. += is an addative operation, but =+ is read as equals positive vector2.

bounce = (+vector2 * delta)

Without a full script it will be hard to help further.