Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: weichx on December 30, 2017, 03:02:21 pm

Title: What is a path for turrets?
Post by: weichx on December 30, 2017, 03:02:21 pm
I'm building an importer for Unity to get POF models loaded without having to through the .dae format first. Everything is working great with the model import but I don't fully understand some of the 'extra' information in the POF file, particularly what paths are for turrets and how I should interpret them. My only thought right now is that it used for targeting. Paths for docking bays make sense but even in that case I'm not sure why a path point has a radius associated with it. Can anyone enlighten me?
Title: Re: What is a path for turrets?
Post by: Axem on December 30, 2017, 03:33:35 pm
There may be a more technical explanation but the basics are like this:

Paths for turrets (and all subsystems) are attack paths for fighters to follow when they get orders to attack subsystems.

Path points have a radius to help guide ships to the path without needing to be exactly on the point. Basically once a ship gets within a path point's radius, its told to start moving to the next one in the path. So the path farthest out gets the largest radius, and they get smaller as they get closer.
Title: Re: What is a path for turrets?
Post by: The E on December 30, 2017, 03:36:30 pm
What axem says is completely correct.
Title: Re: What is a path for turrets?
Post by: weichx on December 30, 2017, 06:01:10 pm
Ok that makes sense, thanks!

Now a follow up question: I'm trying to figure out how turrets know what they can target. For single turrets there must be a field of view setting based on their normal somewhere right? And the same for Multi part turrets + some rotation constraint probably. Where do I find this? I see a few flags like "check hull" can optionally be defined but I can't seem to find the "what can I hit" code anywhere. Anybody know where to look?