I went through this same process when first trying to use the Unity character controller. The default Unity controller was hitting too many edge cases ba-dum-ching for my liking, so I decided to roll my own. I was solving it much like you were in this article, so this article ...