KinematicBodyMoveAndSlideWithSnap Method |
Moves the body while keeping it attached to slopes. Similar to MoveAndSlide(Vector3, NullableVector3, Boolean, Int32, Single, Boolean).
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(Vector3, NullableVector3, Boolean, Int32, Single, Boolean) instead.
Namespace: Godot
public Vector3 MoveAndSlideWithSnap( Vector3 linearVelocity, Vector3 snap, Vector3? upDirection = null, bool stopOnSlope = false, int maxSlides = 4, float floorMaxAngle = 0.785398f, bool infiniteInertia = true )
[Missing <param name="linearVelocity"/> documentation for "M:Godot.KinematicBody.MoveAndSlideWithSnap(Godot.Vector3,Godot.Vector3,System.Nullable{Godot.Vector3},System.Boolean,System.Int32,System.Single,System.Boolean)"]
[Missing <param name="snap"/> documentation for "M:Godot.KinematicBody.MoveAndSlideWithSnap(Godot.Vector3,Godot.Vector3,System.Nullable{Godot.Vector3},System.Boolean,System.Int32,System.Single,System.Boolean)"]
[Missing <param name="stopOnSlope"/> documentation for "M:Godot.KinematicBody.MoveAndSlideWithSnap(Godot.Vector3,Godot.Vector3,System.Nullable{Godot.Vector3},System.Boolean,System.Int32,System.Single,System.Boolean)"]
[Missing <param name="maxSlides"/> documentation for "M:Godot.KinematicBody.MoveAndSlideWithSnap(Godot.Vector3,Godot.Vector3,System.Nullable{Godot.Vector3},System.Boolean,System.Int32,System.Single,System.Boolean)"]
[Missing <param name="floorMaxAngle"/> documentation for "M:Godot.KinematicBody.MoveAndSlideWithSnap(Godot.Vector3,Godot.Vector3,System.Nullable{Godot.Vector3},System.Boolean,System.Int32,System.Single,System.Boolean)"]
[Missing <param name="infiniteInertia"/> documentation for "M:Godot.KinematicBody.MoveAndSlideWithSnap(Godot.Vector3,Godot.Vector3,System.Nullable{Godot.Vector3},System.Boolean,System.Int32,System.Single,System.Boolean)"]
[Missing <returns> documentation for "M:Godot.KinematicBody.MoveAndSlideWithSnap(Godot.Vector3,Godot.Vector3,System.Nullable{Godot.Vector3},System.Boolean,System.Int32,System.Single,System.Boolean)"]