At least, every time I try to get this to work, I end up randomly swearing and cursing!
I want to make a bow turret, and have it able to target anything ahead of the ship. I downloaded Bob's build with the 'point them anywhere' turret code. All seems to be working fine ( after I had realised what a de-bug build did, and how shoddy some of my tabling was!!! )
It seemed to work fine with the parameters I put in, and the turret and gun barrels moved exactly how I wanted them to. Only trouble is, they don't seem to track targets correctly, and the guns fire in directions other than the way the barrels are pointing. I know I must be close, since it is working just about right...I just need to control the direction the guns actually fire! They don't seem to do it all the time....just when the target ship seems to get out of view.
The parts are rigged up OK, and I have the parameters for the code as follows:
this is in the turret bas, which is attached to the front of the ship.
$special=subsystem
$fov=180
$name=GunTurret
$orient:
$uvec: 0,1,0
$fvec: 0,0,1
I set the rotation as Z axis ... don't know if this actually has any kind of effect!
Gun barrels have no code in them. By default, the turret base is a simple cube on the front of the ship, and the barrels point straight out front on the basic POF file. I assumed that 'up' was ....er...up ( +y )and front was +z, and 180 fov would allow the ship to target a 180 degree arc centred around straight ahead. Normals on both firepoints were 0,0,1
Have I got this right?