need some tips for a space fighter crosshair

Hi, i want to move crosshair with mouse axis and shoot… i 'm looking to do this same thing :

the crosshair is manipulated by mouse and mouse button 0 to shoot, how can i do that?

Thanks

use function OnMouseDown() to shoot and wrote down a script so the crosshair follows the mouse arrow. im not programmer this is just a idea.

Somehow you need to get the ship to look at where the crosshair is, and tell the script when you click to fire a laser. I’m still trying to figure out how to script this myself…

Thanks ivanzu, that could work but i´m instantiating the gun from a point, i want the transform (where the gun is shoot) to look at to the mouse pointer, but is not a bad idea what you said…is different what i want, but i will take in mind…

yeah rush-rage that is what i want, im thinking i could set the ship as transform and lookAt mousePosition but need to make a ray cast… i guess…