For now the subsystem's axis must match that of the ships. In the F3 viewer they will look off, but ingame it automatically sets them up properly. I'm making it easy enough to code the subsystems in though:
local Closed = CreateOrientation (0,0,0)
local ZeroOffset = Closed
local OpenPort = CreateOrientation (0, math.rad (-90), 0)
local OpenStar = CreateOrientation (0, math.rad ( 90), 0)
RegisterLandingGearSubsystem (p_subsystemList, "FrontLandingGear", ZeroOffset, Closed, CreateOrientation (math.rad(-90), 0, 0), 1.5, 1.5 )
RegisterLandingGearSubsystem (p_subsystemList, "PortMainLandingGear", ZeroOffset, Closed, OpenPort, 1.5, 1.5)
RegisterLandingGearSubsystem (p_subsystemList, "StarMainLandingGear", ZeroOffset, Closed, OpenStar, 1.5, 1.5)
RegisterLandingGearSubsystem (p_subsystemList, "PortDoor01", ZeroOffset, Closed, OpenPort, .5, 2.5)
RegisterLandingGearSubsystem (p_subsystemList, "PortDoor02", ZeroOffset, Closed, OpenPort, .5, 2.5)
RegisterLandingGearSubsystem (p_subsystemList, "PortDoor03", ZeroOffset, Closed, OpenPort, .5, 4.5)
RegisterLandingGearSubsystem (p_subsystemList, "StarDoor01", ZeroOffset, Closed, OpenStar, .5, 2.5)
RegisterLandingGearSubsystem (p_subsystemList, "StarDoor02", ZeroOffset, Closed, OpenStar, .5, 2.5)
RegisterLandingGearSubsystem (p_subsystemList, "StarDoor03", ZeroOffset, Closed, OpenStar, .5, 4.5)
That's pretty much all you have to do, just register the subsystems with the script and when you have FRED call "OpenLandGear" it'll know which subsystems to rotate and do it all by itself. Same with closing them. Right now I'm working on the thrust vector part. Working pretty good except for one small part, when you rotate from a little less than 359 to a little more than 1, it gets messed up. Thinks it's delta changed 300+ degrees in a frame. I also want to do a sweeping motion (like on real jet radio systems) and thrust nozzle sizing.
Ugh... ship pitch rotation goes as follows:
{0.0001......89.99999, -89.99999....-0.0001,.0001......89.99999, -89.99999....-0.0001} for a complete 360 loop. Not sure how to handle this. 89 - (-89) != 2