Top-Down Firing Angle / Disable Shooting Behind Character

Hi guys! I have a quick question. I’m looking to limit the firing angle in a top-down shooter to -60 to 60 Degrees of where the character is facing. Currently you can fire 360 degrees around your character.

I’ve got it some what working with this code here

However it always fires north, breaking character rotation. I’ve just gone round and round with it and lost track of what I’ve done to try to get it working and feeling pretty dumb right about now.

Video of current behavior:

Any assistance would be greatly appreciated!

No one? Nothing?

Your video privacy is set to private, please change it to unlisted.

Strange, Fixed.

The reason it is not being 60/-60 relative to the player’s rotation is that you are using a hard coded 60/-60. Try clamping it to player yaw + 60, and player yaw - 60.