top down Rail shooter, that can aim in 3D at 180 angle to either shoot at ground or at it's sides

Hello, I already have my spaceship moving and shooting bullets
but how would I make my aiming point downward to shoot at ground enemies
and then if enemies are coming from sides of the screen, to tilt the aiming at 90 degree angles to shoot at the sides?
I would use a gamepad joystick for this aiming

TLDR:
top down aiming system that is moving in 180 degrees, in the shape of a cut in half sphere like here:

Hey there @Psyball! This implementation is going to depend a bit on your final needs, but in most cases you should just be able to clamp the rotation itself.

If you’re setting rotation via an input, something simple like this works:

However if you’re adding rotation, you’ll need a bit more like this:

Hope this points you in the right direction!