Function KinematicBody.moveAndSlideWithSnap

Moves the body while keeping it attached to slopes. Similar to moveAndSlide. As long as the snap vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting snap to (0, 0, 0) or by using moveAndSlide instead.

Vector3 moveAndSlideWithSnap (
  const(Vector3) linear_velocity,
  const(Vector3) snap,
  const(Vector3) up_direction = Vector3(0.00000F, 0.00000F, 0.00000F, ).this(0.00000F, 0.00000F, 0.00000F),
  const(bool) stop_on_slope = false,
  const(long) max_slides = 4L,
  const(double) floor_max_angle = 0.785398,
  const(bool) infinite_inertia = true
) nothrow @nogc;