API Question Multiple Docking ports

astrosammy

Dash!
Addon Developer
Donator
Joined
Apr 27, 2008
Messages
2,124
Reaction score
0
Points
36
Location
ICAO ID: EDFB
How can I add more than one docking port to a vessel?

Code:
SetDockParams (_V(0,0,5), _V(0,0,1), _V(0,1,0));
SetDockParams (_V(0,0,-5), _V(0,0,-1), _V(0,1,0));
That doesn't work, it only has one port.
 
Try using CreateDock method.
 
How can I add more than one docking port to a vessel?

Code:
SetDockParams (_V(0,0,5), _V(0,0,1), _V(0,1,0));
SetDockParams (_V(0,0,-5), _V(0,0,-1), _V(0,1,0));
That doesn't work, it only has one port.
The API Reference has a little tidbit on this...

SetDockParams (1)
Set the parameters for the vessel’s primary docking port (port 0), or create a new dock
if required.
Synopsis:
void SetDockParams (
const VECTOR3 &pos,
const VECTOR3 &dir,
const VECTOR3 &rot) const
Parameters:
pos dock reference position in vessel coordinates
dir approach direction in vessel coordinates
rot longitudinal rotation alignment vector
Notes:
· This function creates a new docking port if none was previously defined.
Otherwise it overwrites the parameters for dock 0.
· See CreateDock for additional notes on the parameters
I know artlav already answered your question, but this is good for future reference.
 
Back
Top