Click or drag to resize

KinematicBody2DTestMove Method

Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given Transform2D, then tries to move the body along the vector rel_vec. Returns true if a collision would occur.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public bool TestMove(
	Transform2D from,
	Vector2 relVec,
	bool infiniteInertia = true
)

Parameters

from
Type: GodotTransform2D

[Missing <param name="from"/> documentation for "M:Godot.KinematicBody2D.TestMove(Godot.Transform2D,Godot.Vector2,System.Boolean)"]

relVec
Type: GodotVector2

[Missing <param name="relVec"/> documentation for "M:Godot.KinematicBody2D.TestMove(Godot.Transform2D,Godot.Vector2,System.Boolean)"]

infiniteInertia (Optional)
Type: SystemBoolean

[Missing <param name="infiniteInertia"/> documentation for "M:Godot.KinematicBody2D.TestMove(Godot.Transform2D,Godot.Vector2,System.Boolean)"]

Return Value

Type: Boolean

[Missing <returns> documentation for "M:Godot.KinematicBody2D.TestMove(Godot.Transform2D,Godot.Vector2,System.Boolean)"]

See Also