I'm used to working in idTech, where swept traces return, as part of their RaycastHit equivalent, the fraction that the trace travelled before hitting an object. This is fantastically useful for movement code, as you can just position your swept object as far as the trace got, and be guaranteed not to be stuck inside anything.
According to the documentation, there doesn't seem to be a direct equivalent (not for spheres or capsules at least). the closest I can see to this is "point" (the position which the sphere collided with the world) and "distance" which is the distance from the start of the trace, to the collision point... or at least, that's what I assume from the description.
Now, with a line trace, the "Fraction" travelled would be super easy to compute, but it gets a little harder when the trace is "thick". See image:
[Edit note: This diagram is DEFINITELY wrong. See third answer below: the distance IS how far along the trace you got (or atleast, it definitely is for rigidbody.SweepTest]

So I guess my question is, is my interpretation of distance correct?
And given that, has anyone done the maths to find the fraction? Writing it out like this is making a solution clearer, but it's nice to share your working sometimes, and if someone has a quick bit of code to ahem appropriate, that'd be nice.

Sat down with a pen and pencil and tried to work this out, and I think it clicked! This is really elegant if it's correct! I think I'm going to set up a test scene for it to make sure.
– anon86285172There's a very good change it's not 100% correct though, but if you go through the steps you should be able to get it to work. :)
– anon73820239Needs a Deg2Rad conversion in the Cos... But the results still have the resultant sphere fairly far away. When I half the radius, I get close, but still no cigar.
– anon86285172http://bezzy.net/UnityTests/SphereCastEndPoint/ here's a little test. You can see that although the cos relationship seems pretty correct, the distance is just slightly off. I wonder if it's some kind of magic number or... hmm. I'll try the line/sphere intersection approach instead.
– anon86285172