have your sword edge shine a beam of light at a 2.3847 degree inclination towards the atmosphere where it will warp slightly and redirect towards alpha centauri and impact the surface releasing about 0.0000001 calories which will speed up the release of free photons to the surface of the star insignificantly but enough to release one stray photon which will conveniently fly back and bounce off a crater in the moon at just the right angle to head back to earth, re-enter the atmosphere, fly down and hit the target you're about to slice with your sword, and bounce right back to the sword's edge letting the sword's internal magic know that it hit something
this is truly the most efficient solution for close range hit detection