The team I'm in is currently making a 2D platformer game, and we've decided to use Unity for it. Like many other 2D platformers, the patforms themselves will be made from square tiles. However, the action is different if the player character collides with a tile from the side (touching a 'wall') rather than colliding with that same tile from the top (touching a 'floor').
I was thinking about having having separate subobjects for each side, with each subobject having its own edge collider. That way, I could tell the difference between the sides and the top. The designer of the game wanted the game to be based on parkour, so we might have actions like wall climbing and such.
There are two other options I'm considering. The first is to have 3 raycasts on each side of the player character (except the top). Thus if the side raycast(s) hit a tile, then the actions done are wall actions (climbing or hanging) and if the bottom raycast hits a tile the actions done are floor actions (standing idle, running, etc.). The other option is similar in concept, but with subobjects instead of raycasts.
Which one do you think would be best, considering Unity's collision support? Or do you have any other ideas?