I might’ve found a solution to my previous question: https://answers.unity.com/questions/1518020/2d-slope-rotation.html
Here’s a pic of what might work: https://answers.unity.com/storage/temp/119560-whatitryingtodo.png
All I need to know is to find out the distance between an object and collider.
Is there any way to measure the distance between an object and a collider? Specifically 2D colliders?