Why is does (+) do on "vel.y += gravity * delta"?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Jan Gabriel

If I didn’t add plus (+) on “vel.y += gravity * delta” it will just make my player seem like its teleporting up instead of jumping up.
func _physics_process(delta):

vel.y += gravity * delta

if Input . is_action_pressed("jump") and is_on_floor():
	vel.y -= jumpForce
vel = move_and_slide(vel, Vector2.UP)
:bust_in_silhouette: Reply From: exuin

vel.y += gravity * delta is equivalent to vel.y = vel.y + gravity * delta. It adds to the current value of the variable. If you don’t have it, then your velocity won’t increase or decrease properly, it will instead be replaced.