Hi, I'm a beginner to Godot.
This is my code:
if abs(velocity.x) > TERMINAL_VEL.x:
velocity.x = sign(velocity.x) * TERMINAL_VEL.x
if abs(velocity.y) > TERMINAL_VEL.y:
velocity.y = sign(velocity.y) * TERMINAL_VEL.y
I haven't worked with Vector2s much, but there must be a shorter way to do this? I've used my previous knowledge of programming to do this.