I used the TopDownMovement bahavior to make a Bomberman clone and I make the players slide on the edges of obstacles. I think this can be reused for other games so I would like to make it an extension.
The code is too long to be screenshot, but here the logic:
The player moves.
For every obstacle in collision, it checks if the player is on the edge and which direction allows to bypass it.
If there is no inconsistency on the direction to take, it simulates a key to move in that direction.
The source is in this topic as a PoC (PlayerMovement external events):
But to do so, I would need to access to the obstacles. According to this thread, the feature may exist one day:
The built-in behaviors PlatformerObject/Platform do what I would like to do but this is only possible for bulit-in behaviors, right?
Maybe this is enough common a behavior to be integrated with the TopDownMovement?
But the version with events relies on diagonals and that may result to some small decelerations (I think that can be solved). I tried to make an extension with the editor but I need to access to the obstacles. Maybe this can be hacked with javascript events?