Virtually sets the node's position, scale and rotation to that of the given
Transform2D, then tries to move the body along the vector
motion. Returns
true if a collision would stop the body from moving along the whole path.
collision is an optional object of type
KinematicCollision2D, which contains additional information about the collision when stopped, or when touching another body along the motion.
safe_margin is the extra margin used for collision recovery (see [member CharacterBody2D.safe_margin] for more details).
If
recovery_as_collision is
true, any depenetration from the recovery phase is also reported as a collision; this is useful for checking whether the body would
touch any other bodies.