On my eagle frieghter for Space 1999. I have it coded so you can select to release on the left or right. The freighter is attached to the Eagle. When the eagle is landed you can release to the left or right. But if the eagle is in flight then the cargo is released only on the left and through the mesh.
hUcgo.DeclareCargoSlot(0,_V( 1.62,-.577,-2),_V(0,0,0)); // slot 0
hUcgo.DeclareCargoSlot(1,_V( 1.62,-.577,-3.3),_V(0,0,0)); // slot 1
hUcgo.DeclareCargoSlot(2,_V( 1.62,-.577,-4.6),_V(0,0,0)); // slot 2
hUcgo.DeclareCargoSlot(3,_V( -1.62,-.577,-2),_V(0,0,0)); // slot 3
hUcgo.DeclareCargoSlot(4,_V( -1.62,-.577,-3.3),_V(0,0,0)); // slot 4
hUcgo.DeclareCargoSlot(5,_V( -1.62,-.577,-4.6),_V(0,0,0)); // slot 5
hUcgo.SetCargoMeshVisibility (0,MESHVIS_ALWAYS);
hUcgo.SetCargoMeshVisibility (1,MESHVIS_ALWAYS);
hUcgo.SetCargoMeshVisibility (2,MESHVIS_ALWAYS);
hUcgo.SetCargoMeshVisibility (3,MESHVIS_ALWAYS);
hUcgo.SetCargoMeshVisibility (4,MESHVIS_ALWAYS);
hUcgo.SetCargoMeshVisibility (5,MESHVIS_ALWAYS);
// UCGO 2.0 Parameters settings
hUcgo.SetReleaseSpeedInSpace(0.10f); // release speed of cargo in space in m/s
hUcgo.SetMaxCargoMassAcceptable(50000.0); // max cargo mass in kg that your vessel can carry
hUcgo.SetGrappleDistance(15); // grapple distance radius in meter from center of ship
hUcgo.SetGlobalGroundReleasePos(_V(6,0,-2.5));// global release pos on ground
Here is where I select the left or right. But even if none is selected it should release at 6 on the x axis. But releases like
x=2.
if(key==OAPI_KEY_6&&!KEYMOD_SHIFT(kstate)&&!KEYMOD_CONTROL (kstate))
{
hUcgo.SetGlobalGroundReleasePos(_V(6,0,-2.5));// global release pos on ground
strcpy(SendCargHudMessage(),"Left Cargo release Selected");
}
if(key==OAPI_KEY_7&&!KEYMOD_SHIFT(kstate)&&!KEYMOD_CONTROL (kstate))
strcpy(SendCargHudMessage(),"Right Cargo release Selected");
{
hUcgo.SetGlobalGroundReleasePos(_V(-6,0,3.75));// global release pos on ground
}