I have this code. but I get this error:
chariot1.cpp
c:\orbitertest\orbitersdk\samples\shuttlepb\chariot1.cpp(235) : warning C4700: local variable 'speedvec' used without having been initialized
I was told that the oapiGetFocusShipAirspeedVector(speedvec) initialized the speedvec. Not sure how to fix this.
What I am doing . Is to determine which direction a vessel is going. in the z direction.
An ideas
VECTOR3 *speedvec; // first we declare our vector
oapiGetFocusShipAirspeedVector(speedvec);//then we retrieve its x,y,z
if (GroundContact()==true && GetAirspeed() >13 && (speedvec->z>0))
{AddForce(_V(0,0,-5e3),_V(0,0,0));}
if (GroundContact()==true && GetAirspeed() >13 && (speedvec->z<0))
{AddForce(_V(0,0,5e3),_V(0,0,0));}