If I take the XR5_Vanguard and another vessel and write the output of their relative locations into the oapiDebugString, like so...
VESSEL* vanguard,v2;
vanguard=oapiGetVesselByName("XR5Vanguard");
v2=oapiGetVesselByName("Vessel2");
VECTOR3 relativePos;
vanguard->getRelativePos(v2->GetHandle(),relativePos);
sprintf(oapiDebugString(),"x=%.2 y=%.2 z=%.2",relativePos.x, relativePos.y, relativePos.z);
...Run orbiter and set my XR5Vanguard to v2's position in the scenario editor.
The relative position as printed on the oapiDebugString is (x=4.20 y=4.07 z=-1.97). Now granted that my v2 vessel's origin on the y axis is 0 (the ground), this should only affect the y axis value on the output, not the other two axis. Do I need to transform my vector using a matrix, and if so, what function should I use to do this? Any help is greatly appreciated.
VESSEL* vanguard,v2;
vanguard=oapiGetVesselByName("XR5Vanguard");
v2=oapiGetVesselByName("Vessel2");
VECTOR3 relativePos;
vanguard->getRelativePos(v2->GetHandle(),relativePos);
sprintf(oapiDebugString(),"x=%.2 y=%.2 z=%.2",relativePos.x, relativePos.y, relativePos.z);
...Run orbiter and set my XR5Vanguard to v2's position in the scenario editor.
The relative position as printed on the oapiDebugString is (x=4.20 y=4.07 z=-1.97). Now granted that my v2 vessel's origin on the y axis is 0 (the ground), this should only affect the y axis value on the output, not the other two axis. Do I need to transform my vector using a matrix, and if so, what function should I use to do this? Any help is greatly appreciated.