I'm making a game similar to the game Portal.
Left click to place blue portals.
Shift + left click to place orange portals.
Though portals don't work at the moment.
So, the problem is: sometimes the portal faces the wrong direction.
How do I make the portal face a certain direction depending on where they are on another sprite?
Instead of using the direction of the orb - maybe check to see what its touching
So check for touching any sprite or the edge
If its touching the edge - do a sub check on whether its on the left or right of the stage (so it should be vertical) and the same for the top/bottom but make it horizontal
split the box and floor into two sprites and then do similar checks for them - floor = horizontal - box =vertical
If you make some custom touching reporters for each of the edges (or one custom one with a menu would be better) - they could come in handy for future projects (or for someone else to use in their projects)