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 settingsnap to(0, 0, 0) or by using moveAndSlide instead.

struct KinematicBody
@nogc nothrow
Vector3
moveAndSlideWithSnap
(
in Vector3 linear_velocity
,
in Vector3 snap
,
in Vector3 floor_normal = Vector3(0, 0, 0)
,
in bool infinite_inertia = true
,
in bool stop_on_slope = false
,
in long max_bounces = 4
,
in double floor_max_angle = 0.785398
)

Meta