Click or drag to resize

Shape2DCollideWithMotionAndGetContacts Method

Returns a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions the list is empty.

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 Array CollideWithMotionAndGetContacts(
	Transform2D localXform,
	Vector2 localMotion,
	Shape2D withShape,
	Transform2D shapeXform,
	Vector2 shapeMotion
)

Parameters

localXform
Type: GodotTransform2D

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

localMotion
Type: GodotVector2

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

withShape
Type: GodotShape2D

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

shapeXform
Type: GodotTransform2D

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

shapeMotion
Type: GodotVector2

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

Return Value

Type: Array

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

See Also