Works with sides and corners working up to capsule collision :) The script is in the “Use this sprite”
The article: https://www.jeffreythompson.org/collision-detection/circle-rect.php This is a pretty improved version of his code