You can't restrict movement along an axis, but you have a couple of options if you are making a Direct-control game:
1) If you are making a Direct-controlled game, you can use the Player: Constrain Action to lock the player along a direction relative to the camera (e.g. left/right, up/down)
2) This is a little-known feature, but you can also use the Player: Constrain Action to lock the player to a pre-determined Path prefab. This restricts movement only along the locus of the Path (Paths are available in the Scene Manager as a prefab).
Comments
1) If you are making a Direct-controlled game, you can use the Player: Constrain Action to lock the player along a direction relative to the camera (e.g. left/right, up/down)
2) This is a little-known feature, but you can also use the Player: Constrain Action to lock the player to a pre-determined Path prefab. This restricts movement only along the locus of the Path (Paths are available in the Scene Manager as a prefab).