How can I rotate my input axes 90º?

I have two input axes that are relative not to the player’s current heading, but to a fixed view of a playing board: north-south and east-west. I want to be able to move my camera around the game board in 90º increments. So after a right rotation, North becomes East, East becomes South, South becomes West, West becomes North, etc., and after four moves, the controls and the camera are both back where they started.

How might I go about doing that? It seems like a much trickier problem than simply flipping an axis.

I guess you have a transform that is actually rotated by 90° ?

This transform have some nice properties: .forward / .right / .up which returns a normalized vector in world space.

Just use those to apply your input:

// UnityScript

var cameraTransform : Transform;

function Update()
{
    var movement = cameraTransform.forward * Input.GetAxis ("Vertical") * speed;
    movement += cameraTransform.right * Input.GetAxis ("Horizontal") * speed;
    [...]