
From that mod I used a helper function that calculates the angle of the vector from the playership to the target of the playership.
With this tool in my hands I made 2 mods:
ICX AutoCannon !
Basically I reinvented the omnidirectional cannon in script code. The cannon automatically shoots down enemy ships.
It works with targeted spaceobjects or it tracks automatically the nearest ship.
It can be turned on and off.
I think that every addict to omnidirectional weapons will love it!

Locked Angle Turret Mod !
Proof of concept code, it's basically my old switchable omni/non-omni turbolaser cannon; in this version however the cannon will continue to fire in the last direction when the omnidirectional turret is turned off.
The code was a bit tricky because I had to keep in cosideration both the angle between the 2 spaceobjects and the facing direction of the playership.
(it has a small bug, the first switch is not working, and I don't know why, simply the omnidirectional version remain in the cargo of the playership. From the second use it works perfectly)