Function Physics2DServerSingleton.bodyTestMotion

Returns true if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. Physics2DTestMotionResult can be passed to return additional information in.

bool bodyTestMotion (
  const(RID) _body,
  const(Transform2D) from,
  const(Vector2) motion,
  const(bool) infinite_inertia,
  const(double) margin = 0.08,
  Physics2DTestMotionResult result = Physics2DTestMotionResult(godot_object(null), )
) nothrow @nogc;