How do i constraint movement of players in a angle range

I have a tower defense game where the tower canon shoots at and destroys incoming enemies. How do I ensure that the movement arc of the canon is constrained in a specific angle range only? Can anyone help?

Check the angle of the tower, and make sure it’s within the range you want?

Got it working with the help of the turret extension, need just a little angular maths!