I've been testing with that a bit and reading capsuleHit would be what i'm looking for over heelHit (that way if i move a platform away from the edge of the feet the raycast will still point to the platform, unlike heelHit).
When not using the "best" quality then using heelHit is perfect (since capsuleHit doesn't exist).
So ideally a public GetHitPoint function that returns either capsuleHit when using "best" or heelHit otherwise would be ideal.
The only issue left is that the raycast always comes from the animation's foot position rather than the real foot position. (the cyan ray is heelHit.point, the magenta ray is capsuleHit.point, i'm not sure why the capsule cast hits in front but it works correctly either way)
Which means the values aren't correct when IK pinning the feet, which prevents the grounder script from grounding the feet correctly (if they're pinned on top of a platform but the character moves beyond it the script will think they're off the platform and either not ground them at all or move them inside the platform).
I tried changing the script execution order but that didn't help. Keep in mind this issue occurs whenever using IK targets with the feet, not just in my specific case.
That can be fixed by overloading GetRaycastHit and GetCapsuleHit to also accept a transform/vector3 that will be used instead of the heel transform (which should be easy).
Having GetHitPoint use those new functions would be enough for my purposes (as i can manually fix the height of the feet on my own).
So it'd look like this: public raycastHit GetHitPoint (Vector3 position), where position is the position of the foot.
To fix that issue for everyone who's setting IK targets to a character's legs, then you'd need some way to switch between either type of GetRaycastHit and GetCapsuleHit depending on whether a limb's IKweight is 0 or greater than 0 (which is more difficult).
Or at least that's the solution i came up with, i'm not sure about the last point (as there may be issues when not following the animation's feet positions) but otherwise it should be good.
Is that reasonable?