I want to press a key which selects which camera position to get.
I have this:
in the h
compiles but the camera position doesn't change when C is pressed
I have this:
Code:
void CENTURI::SelectCockpitView (int CAM)
{
switch (CAM) {
case 0: //pad
SetCameraDefaultDirection (_V(.7,0,.7));
SetCameraOffset (_V(37.448,-34.095,37.488));
break;
case 1: //command
SetCameraDefaultDirection (_V(0,0,-1));
SetCameraOffset (_V(0,65,-100));
break;
case 2: //balcony
SetCameraDefaultDirection (_V(-1,0,0));
SetCameraOffset (_V(-150,65,0));
break;
case 3: //command
SetCameraDefaultDirection (_V(0,0,1));
SetCameraOffset (_V(0,65,100));
break;
case 4: //balcony
SetCameraDefaultDirection (_V(1,0,0));
SetCameraOffset (_V(150,65,0));
break;
}
}
....
case OAPI_KEY_C: //Select camera
{CAM = CAM + 1;
if(CAM > 5) CAM = 0;
}
return 1;
in the h
Code:
void CENTURI::SelectCockpitView (int CAM);
int CAM;
compiles but the camera position doesn't change when C is pressed