Traversing different surfaces is achieved by moving along a custom navigation plane that we create based on the surface we are attached to. We take the normal of the surface and project our current forward velocity onto the surface to calculate the up, forward and right directions of the navplane. We trace every frame to see if we should attach to a new surface or lose our grip on the one we are currently attached to.
The tracing is done in four different directions (see the diagram to the right): our forward movement direction, the world down direction, the opposite of the surface normal direction and finally diagonally down backwards from the forward direction.
Using these directions we are able to account for most scenarios of geometry, the diagonal even allows us to traverse sharp corners. Additionally the player character gets attached to any surface it sticks to, allowing the character to travel with moving surfaces.