Hey folks, I've been working with warheads and the $Tech Model system is really irritating me. I'd like some coder to post the relevant portion of the source so modders and modelers can format their stuff properly.
So far as I can tell, the code was built around Freespace missiles having their centers set to the back of the engines. The LOD0 has an offset of 0,0,0 and the Center of Mass and Tech Room Center are all set to 0,0,0. This is the case for both loadout and in-game models.
Consequently, to have the missiles rotate around their centers, the loadout screen automatically rotates at a point halfway down the missile length. How does it calculate this, from the bounding box, or the radius, using toe origin, the Center of Mass or the Tech Room Center? And does the LOD0 offset have anything to do with it?
Also, how does it calculate zoom and view angle? It again seems to be based on the radius or bounding box but it's impossible to tell, since it's not specified in the weapons.tbl like it is in ships.tbl, and it's not documented on the Wiki. I only found one other thread
on this issue.
Can we just dispense with this behind-the-scenes auto-centering and have it always use the tech room center rotation point, and specify the zoom values in the weapons.tbl entry? Making this code use the same parameters as the 3D ship selection model code would make things more consistent and therefore easier for all parties.
Finally, I'd like to know if this issue with primary weapon models
has been resolved. I'd like to do some spinning guns too.