How to get player to follow a "tracer"

So, how I want my game to work is entirely using 2D physics. The catch how I want my game to work is that the environment is all 3D and so the player can do the normal left/right and up/down, but the catch is I want him to move along the Z axis as well, but without having input control over it, but rather it is indirectly down, by following this tracer when it chooses to move along the Z axis.

So let me try and paint a picture. Say, you have a narrow hallway that only goes left and right, so the restriction in movement only works for Horizontal and Vertical movement, BUT when we reach the end of the hall way there is another hallway leading out, so instead of having the player press up to move forward, we just press ‘D’ or ‘->’ to make him turn into that hallway, which is done because he is following this “tracer”.
So in sense the movement Left and Right is working in relation to this tracer.

So think about this image http://img.nobodybuy.com/2010/01/07/sales34776/0x0_p606558/bead-game-bead-maze-toy.jpg
and would only be controlled with a left and a right toggle on the keyboard, which in the image uses all 3 dimensions. I have a slight idea on how to make it work, but was wondering if some one could help flesh out this idea. Also, I would need to rotate the player to look more realistic and the camera is attached to the player.

Edit: Was hoping someone know some method in Unity which could act as a tracer. Meaning I am restricted to this path only and the toggled input act according to this tracer.

I’m not sure I understand your description. Based on the picture, what I would do is create an array of Vector3’s to describe the path. I would create an empty game object. Moving forward would move the empty game object along the path AND rotate the game object so that it was facing along the path. Next I would create a child game object representing my character (a bead in the photograph). I would use transform.localPosition to move the bead up/down/left/right. This will move the bead relative to the parent game object on the path.