I am trying to get ShiftCG to function. I looked at the Atlantis code.
and here:
OFS_WITHTANK_ORBITER and OFS_WITHTANK_ORBITER are both Vector3
Ok. When I duplicate I get this error:
::ShiftCG' : function does not take 1 arguments
8.51.3.251 voidVESSEL::ShiftCG(constVECTOR3&shift) Shift the centre of gravity of a vessel.
Parameters: shift centre of gravity displacement vector [m]
Note: This function should be called after a vessel has undergone a structural change which resulted in a shift of the vessel’s centre of gravity (CG). Note that in Orbiter, a vessel’s CG coincides by definition always with the origin (0,0,0) of its local reference frame. Therefore, in order to achieve a shift of the CG by shift, this function performs the following actions: • Calls ShiftCentreOfMass (+shift) to align the vessel’s global position with the new CG position. • Calls ShiftMeshes (-shift) to compensate the mesh positions • Applies equivalent shift to all – thruster positions, – docking ports, – attachment points, – explicitly defined light source positions, – and to the cockpit camera position The net effect is a shift of the vessel frame of reference (and thus the CG by +shift, while the mesh positions remain in place in the global frame.
Code:
ShiftCG (OFS_LAUNCH_ORBITER-OFS_WITHTANK_ORBITER);
Code:
ShiftCG (OFS_WITHTANK_ORBITER);
OFS_WITHTANK_ORBITER and OFS_WITHTANK_ORBITER are both Vector3
Code:
const VECTOR3 OFS_ZERO = { 0.0, 0.0, 0.0 };
const VECTOR3 OFS_LAUNCH_ORBITER = { 0.0, 6.22,-7.795};
const VECTOR3 OFS_LAUNCH_TANK = { 0.0,-1.91, 5.72 };
const VECTOR3 OFS_LAUNCH_RIGHTSRB = { 6.2,-1.91,-5.68 };
const VECTOR3 OFS_LAUNCH_LEFTSRB = {-6.2,-1.91,-5.68 };
const VECTOR3 OFS_WITHTANK_ORBITER = { 0.0, 4.79,-9.185};
const VECTOR3 OFS_WITHTANK_TANK = { 0.0,-3.34, 4.33 };
const VECTOR3 ORBITER_DOCKPOS = { 0.0, 2.44,10.44 };
const VECTOR3 OFS_MMU = {0,2.44,10.44};
Ok. When I duplicate I get this error:
::ShiftCG' : function does not take 1 arguments
8.51.3.251 voidVESSEL::ShiftCG(constVECTOR3&shift) Shift the centre of gravity of a vessel.
Parameters: shift centre of gravity displacement vector [m]
Note: This function should be called after a vessel has undergone a structural change which resulted in a shift of the vessel’s centre of gravity (CG). Note that in Orbiter, a vessel’s CG coincides by definition always with the origin (0,0,0) of its local reference frame. Therefore, in order to achieve a shift of the CG by shift, this function performs the following actions: • Calls ShiftCentreOfMass (+shift) to align the vessel’s global position with the new CG position. • Calls ShiftMeshes (-shift) to compensate the mesh positions • Applies equivalent shift to all – thruster positions, – docking ports, – attachment points, – explicitly defined light source positions, – and to the cockpit camera position The net effect is a shift of the vessel frame of reference (and thus the CG by +shift, while the mesh positions remain in place in the global frame.