Check if the camera is moving?

Basically I want to hit an object, but only if the character is still so neither the character is moving nor the camera is rotating.

I already managed to check if the character moving but unable to find a solution to check the rotating camera.
I am using the standard FirstPersonSetup.

Simply save the Transform.rotation each frame. If the current rotation does not match the previous rotation, then you know the camera is rotating:

var prevRotation : Quaternion;

function Start() {
    prevRotation = transform.rotation;
}

function Update() {
    if (prevRotation != transform.Rotation) {
        Debug.Log("I'm rotating");
    }
    prevRotation = transform.rotation;
}