Click or drag to resize

Shape2DCollideWithMotion Method

Returns whether this shape would collide with another, if a given movement was applied.

This method needs the transformation matrix for this shape (local_xform), the movement to test on this shape (local_motion), the shape to check collisions with (with_shape), the transformation matrix of that shape (shape_xform), and the movement to test onto the other object (shape_motion).

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public bool CollideWithMotion(
	Transform2D localXform,
	Vector2 localMotion,
	Shape2D withShape,
	Transform2D shapeXform,
	Vector2 shapeMotion
)

Parameters

localXform
Type: GodotTransform2D

[Missing <param name="localXform"/> documentation for "M:Godot.Shape2D.CollideWithMotion(Godot.Transform2D,Godot.Vector2,Godot.Shape2D,Godot.Transform2D,Godot.Vector2)"]

localMotion
Type: GodotVector2

[Missing <param name="localMotion"/> documentation for "M:Godot.Shape2D.CollideWithMotion(Godot.Transform2D,Godot.Vector2,Godot.Shape2D,Godot.Transform2D,Godot.Vector2)"]

withShape
Type: GodotShape2D

[Missing <param name="withShape"/> documentation for "M:Godot.Shape2D.CollideWithMotion(Godot.Transform2D,Godot.Vector2,Godot.Shape2D,Godot.Transform2D,Godot.Vector2)"]

shapeXform
Type: GodotTransform2D

[Missing <param name="shapeXform"/> documentation for "M:Godot.Shape2D.CollideWithMotion(Godot.Transform2D,Godot.Vector2,Godot.Shape2D,Godot.Transform2D,Godot.Vector2)"]

shapeMotion
Type: GodotVector2

[Missing <param name="shapeMotion"/> documentation for "M:Godot.Shape2D.CollideWithMotion(Godot.Transform2D,Godot.Vector2,Godot.Shape2D,Godot.Transform2D,Godot.Vector2)"]

Return Value

Type: Boolean

[Missing <returns> documentation for "M:Godot.Shape2D.CollideWithMotion(Godot.Transform2D,Godot.Vector2,Godot.Shape2D,Godot.Transform2D,Godot.Vector2)"]

See Also