Well-aligned multiple lasers
Posted: Sat Nov 14, 2020 4:01 pm
When a ship has multiple forward lasers, small targets like escorts often missed by the wing-mounted weapons due to they placed farther from the center line than the width of the target.
There is a way to address this problem: side lasers can be oriented a bit towards to center. Beams can cross the center line for example at 10km forward from the ship, which make them accurate against smaller targets too. In this way all lasers can hit an Adder or Tharglet at once!
To get the orientation numbers you can use Quaternion.xls. Using 31.5m mount width and 10km average target distance, enter 90-inv.tan(10000/31.5) = 0.18 degree into the second yellow input cell next to Y, and X=0, Z=0. The result quaternion is (1.0 0.0 0.0016 0.0) for the left side. For right side laser enter 360-0.18 = 359.82 as Y, which give (-1.0 0.0 0.0016 0.0).
Orientations can not be applied to the weapons inside the ship, but usable on subentities which can hold the side lasers. Here is an example shipdata.plist with the calculated orientations:
I do not tested it yet. What do you think?
There is a way to address this problem: side lasers can be oriented a bit towards to center. Beams can cross the center line for example at 10km forward from the ship, which make them accurate against smaller targets too. In this way all lasers can hit an Adder or Tharglet at once!
To get the orientation numbers you can use Quaternion.xls. Using 31.5m mount width and 10km average target distance, enter 90-inv.tan(10000/31.5) = 0.18 degree into the second yellow input cell next to Y, and X=0, Z=0. The result quaternion is (1.0 0.0 0.0016 0.0) for the left side. For right side laser enter 360-0.18 = 359.82 as Y, which give (-1.0 0.0 0.0016 0.0).
Orientations can not be applied to the weapons inside the ship, but usable on subentities which can hold the side lasers. Here is an example shipdata.plist with the calculated orientations:
Code: Select all
"myship" = {
name = "My ship with well-aligned multiple lasers";
frangible = 0; // set to 1 if you want to be able to lose side lasers due to damage or collision
...
subentities = ( //forward side lasers in addition to the main laser
{ subentity_key = "sublaser"; position = "-31.5 0.0 0.0"; orientation = "1.0 0.0 0.0016 0.0"; },
{ subentity_key = "sublaser"; position = "31.5 0.0 0.0"; orientation = "-1.0 0.0 0.0016 0.0"; }
);
}
"sublaser" = { //a subentity with laser
"ai_type" = "nullAI.plist";
"energy_recharge_rate" = 1.0; //irrelevant if the ship has frangible = 0;
"forward_weapon_type" = "WEAPON_MILITARY_LASER";
"max_energy" = 120.0; //irrelevant if the ship has frangible = 0;
"model" = "snipergun.dat"; //this need snipergun oxp, or you must add at least a dummy model
"name" = "Sublaser";
"roles" = "sublaser";
};