How can my window shake while im running?

HI there how can I make my camera shake while im running? I mean rotating…Im using the FPS input controller. Im a newbie with unity…

In this case, I think that moving the camera around would work better than rotation. In the simplest case, I’d make the camera a child of a ‘shaker’ object, that randomly moves around whenever the screenshake is active. You might want to include some damping, but in the simplest form, it goes like this:

transform.localPosition = Random.insideUnitSphere * shakePower;

where shakePower is a float between 0 and infinity.

To damp it, have the position interpolate between points ever few tenths of a second.

currentShakeTime += Time.deltaTime * shakeSpeed;
transform.localPosition = Vector3.Lerp(previousPos, nextPos, currentShakeTime);

if(currentShakeTime >= 1)
    previousPos = nextPos;
    nextPos = Random.insideUnitSphere * shakePower;
    currentShakeTime = 0;