Click or drag to resize

KinematicBodyMoveAndCollide Method

Moves the body along the vector rel_vec. The body will stop if it collides. Returns a KinematicCollision, which contains information about the collision.

If test_only is true, the body does not move but the would-be collision information is given.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public KinematicCollision MoveAndCollide(
	Vector3 relVec,
	bool infiniteInertia = true,
	bool excludeRaycastShapes = true,
	bool testOnly = false
)

Parameters

relVec
Type: GodotVector3

[Missing <param name="relVec"/> documentation for "M:Godot.KinematicBody.MoveAndCollide(Godot.Vector3,System.Boolean,System.Boolean,System.Boolean)"]

infiniteInertia (Optional)
Type: SystemBoolean

[Missing <param name="infiniteInertia"/> documentation for "M:Godot.KinematicBody.MoveAndCollide(Godot.Vector3,System.Boolean,System.Boolean,System.Boolean)"]

excludeRaycastShapes (Optional)
Type: SystemBoolean

[Missing <param name="excludeRaycastShapes"/> documentation for "M:Godot.KinematicBody.MoveAndCollide(Godot.Vector3,System.Boolean,System.Boolean,System.Boolean)"]

testOnly (Optional)
Type: SystemBoolean

[Missing <param name="testOnly"/> documentation for "M:Godot.KinematicBody.MoveAndCollide(Godot.Vector3,System.Boolean,System.Boolean,System.Boolean)"]

Return Value

Type: KinematicCollision

[Missing <returns> documentation for "M:Godot.KinematicBody.MoveAndCollide(Godot.Vector3,System.Boolean,System.Boolean,System.Boolean)"]

See Also