how to check who collide with object in move_and_slide?

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

how to check who collide with object in move_and_slide?
like if i want check who i collide with in move_and_collide , i can just do like this move_and_collide(motion).collider. but i dont know how to do it with move_and_slide.

and why move_and_slide didn’t need *delta?

var right = Input.is_action_pressed("ui_right")
var left = Input.is_action_pressed("ui_left")
var up = Input.is_action_pressed("ui_up")
var down = Input.is_action_pressed("ui_down")

movement.x = int(right) - int(left)
movement.y = int(down) - int(up)

var motion = movement.normalized()*move_speed*delta
move_and_collide(motion)

var collision = move_and_collide(motion)
if collision:
	var collider = collision.collider
	if collider.is_in_group("wall"):
		queue_free()
	if collider.name == "enemy":
		if scale <= Vector2(10,10):
			scale += Vector2(1,1)
		else:
			scale = Vector2(1,1)