Download

Side Scroller Spawn Projectile Constaints

I am using the code for a side scroller game for shooting. With this code when you click on the screen it will spawn a projectile going towards the mouse. I was wondering how to make it so you can only shoot within a 90 degree angle. So when you click behind the character it will not shoot. Thanks!

Check if the Forward Vector of the character is within 90 degrees of the mouse click.

How could I check of the character is within 90 degrees, using Forward Vector?