How to trigger when an animated collider hits the player

The effect I’m trying to make it a rotating CCTV camera, when you are in its range of sight I want it to trigger.

I have a First Person Controller and a cube (CCTV Camera) then I remove its collider and add a box collider as a child that sticks out quite far being the range, (Tick is trigger), then using unity animation I make it rotate 180 degrees sweeping back and forth then add this script to either the player or the cube. I get a hit if the player is moving and therefore hits the collider. But if I’m not moving and the collider sweeps past me no hit is registered. How do I trigger the collider hitting the player rather than the player hitting the collider?

function OnTriggerEnter(hit: Collider){

Debug.Log("Hit " + hit.gameObject.tag);

}

Brilliant that works a treat!