Character Walk on a Wall? (E.g Sonic running around a loop)

I would probably trace downward and find the normal of the hit to orient the character. Though I expect you’d have to have a few line traces and interpolate between them to anticipate curves.