Click or drag to resize

KinematicBody2DMoveAndSlideWithSnap Method

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public Vector2 MoveAndSlideWithSnap(
	Vector2 linearVelocity,
	Vector2 snap,
	Vector2? upDirection = null,
	bool stopOnSlope = false,
	int maxSlides = 4,
	float floorMaxAngle = 0.785398f,
	bool infiniteInertia = true
)

Parameters

linearVelocity
Type: GodotVector2

[Missing <param name="linearVelocity"/> documentation for "M:Godot.KinematicBody2D.MoveAndSlideWithSnap(Godot.Vector2,Godot.Vector2,System.Nullable{Godot.Vector2},System.Boolean,System.Int32,System.Single,System.Boolean)"]

snap
Type: GodotVector2

[Missing <param name="snap"/> documentation for "M:Godot.KinematicBody2D.MoveAndSlideWithSnap(Godot.Vector2,Godot.Vector2,System.Nullable{Godot.Vector2},System.Boolean,System.Int32,System.Single,System.Boolean)"]

upDirection (Optional)
Type: SystemNullableVector2
If the parameter is null, then the default value is new Vector2(0, 0)
stopOnSlope (Optional)
Type: SystemBoolean

[Missing <param name="stopOnSlope"/> documentation for "M:Godot.KinematicBody2D.MoveAndSlideWithSnap(Godot.Vector2,Godot.Vector2,System.Nullable{Godot.Vector2},System.Boolean,System.Int32,System.Single,System.Boolean)"]

maxSlides (Optional)
Type: SystemInt32

[Missing <param name="maxSlides"/> documentation for "M:Godot.KinematicBody2D.MoveAndSlideWithSnap(Godot.Vector2,Godot.Vector2,System.Nullable{Godot.Vector2},System.Boolean,System.Int32,System.Single,System.Boolean)"]

floorMaxAngle (Optional)
Type: SystemSingle

[Missing <param name="floorMaxAngle"/> documentation for "M:Godot.KinematicBody2D.MoveAndSlideWithSnap(Godot.Vector2,Godot.Vector2,System.Nullable{Godot.Vector2},System.Boolean,System.Int32,System.Single,System.Boolean)"]

infiniteInertia (Optional)
Type: SystemBoolean

[Missing <param name="infiniteInertia"/> documentation for "M:Godot.KinematicBody2D.MoveAndSlideWithSnap(Godot.Vector2,Godot.Vector2,System.Nullable{Godot.Vector2},System.Boolean,System.Int32,System.Single,System.Boolean)"]

Return Value

Type: Vector2

[Missing <returns> documentation for "M:Godot.KinematicBody2D.MoveAndSlideWithSnap(Godot.Vector2,Godot.Vector2,System.Nullable{Godot.Vector2},System.Boolean,System.Int32,System.Single,System.Boolean)"]

See Also