Use clamp to set velocity.y

velocity.y = clamp(velocity.y + gravity, 0, max_fall_velocity)

1 Like

It will cause issues with jumping in future tutorial parts. Better to leave it as it is and fine tune at the end.

Privacy & Terms