Right, so I kind of get what I NEED to do, but HOW to do it is confusing me... I understand there are several options...
What I have tried:
Set up a submodel of the main model as 'gun', and set its rotation type (to 'rotate'... duh) and axis in PCS2, also adding '$gun_rotation' as a subobject property. I assume that setting this property allows the code to use the values $submodel_rotation_speed and $submodel_rotation_acceleration in weapons.tbl to define speed and acceleration... or not?
It doesn't work.
Also tried adding this to my ship entry in ships.tbl:
$default PBanks: ( "Gun" )
$animation: triggered
$type: primary_bank
+sub_type: 0
+delay: 0
+absolute_angle: 180,0,0
+velocity: 200,0,0
+acceleration: 120,0,0
+time: 2000
This doesn't work either.
I also tried the option of doing a separate export for the weapon, and mounting it separately (as described by Getter Robo G). Didn't work. Also tried defining rotation type and axis using PCS2 on this separately exported weapon model. Also didn't work.
I will be clear - the weapon fires, the submodel just doesn't rotate.
What am I doing wrong? The animation code stuff is cut and paste from what I could see in Steve-o's mod, just not in a .tbm. Does it NEED to be in a .tbm? My understanding is that it would work fine just being added to the ship entry in ships.tbl...
Sigh. Bet it's some really easy step I'm missing...