- Defined in subobject properties of PCS2 - in the turret base properties area (along with $fov etc. etc.)
Correct.
- Co-ordinates are -x,y,z is PCS2? And not in degrees... so what is it in?
The values represent a normalized local vector. That is, exactly like turret/eyepoint/thruster normals are supposed to. If in doubt, you can always create the vector of your choosing using the turret/eyepoint/thruster normal editing boxes, and then copy the result to your $fvec and $uvec props (just remember to change : to ,).
- Can be overridden by table info, the phase of the moon, or ghosts
Nope, can't be overridden anywhere.
Explanation - trying to set up some multipart turrets with a limited field of fire, sticking out 90 degrees from a ship hull (kind of like a broadside cannon).
Have tried multiple different orientations of export, frozen & unfrozen rotation info, animation code in the table file etc. etc. So far everything I try simply ends up with the turret firing forwards, no matter what (and the visual doing all sorts of things - barrels rotation all over the place etc. etc.
As I said, I usually trawl the forums until I find the solution, but so far have come up empty. Can't even seem to find fvec values or anything on original freespace2 models!~
Anyone able to help?
M.
For a turret which is on the left side of the ship (turret's up vector points to the left) pointing forward (forward vector points forward), then you want this (assuming you want the turret to have a 180 degree hemispherical FOV):
$fvec: 0.0,0.0,1.0
$uvec: -1.0,0.0,0.0
$special=subsystem
$fov=180
Worth noting is that PCS2 (and/or the pof format itself) uses reversed x axis coordinates. So the position (offset) coordinates of your left-side turret probably have a positive x component, but in the turret vecs negative x means left and positive x means right.
The $fov prop works so that if you want the turret to able to lower its barrels lower than horizontal (from the turret's POV), then you want values higher than 180, and if you want the barrels to not be able to reach even horizontal level, then you want a lower value. Works for either multiparts or singleparts. To limit the rotation of the turret's base or the maximum elevation of the barrels, look at the
Subsystem page.
Finally, a couple of things which will save you some time: firstly, the rotation axis doesn't need to be set (I think it's only needed for submodels which use $rotate or $dumb_rotate) and secondly, turret normals don't need to be set for multiparts which have $fvec and $uvec.