I have run into 2 issues not sure how to fix them if possible.
1. Generally the default for the camera is +Z direction. I have it set this way but it still show the +z direction.
2. I can select the cockpit camera to different locations. But when I switch to another vessel and back to this one it goes back to the default direction. When I press a key to change the camera position it goes to the next one. So I have to cycle back to here I was.
1. Generally the default for the camera is +Z direction. I have it set this way but it still show the +z direction.
Code:
{
// physical specs
SetSize (10);
SetEmptyMass (1500.0);
SetCW (0.3, 0.3, 0.6, 0.9);
SetWingAspect (0.1);
SetWingEffectiveness (0.1);
SetCrossSections (_V(1,1,1));
SetRotDrag (_V(1.5, 1.5, 1.5));
if (GetFlightModel() >= 1) {
SetPitchMomentScale (1e-4);
SetBankMomentScale (1e-4);
}
SetTrimScale (0.05);
SetCameraDefaultDirection (_V(0,0,-1));
SetCameraOffset (_V(-.1,-8.2,15.9));
2. I can select the cockpit camera to different locations. But when I switch to another vessel and back to this one it goes back to the default direction. When I press a key to change the camera position it goes to the next one. So I have to cycle back to here I was.
Code:
void MYvessel::SelectCockpitView (int CAM)
{
if (CAM==1) {
SetCameraDefaultDirection (_V(0,-.453990,-.89));
SetCameraOffset (_V(-.1,-3.5,18));
oapiCameraSetCockpitDir (0,0);
}
if (CAM==2) {
SetCameraDefaultDirection (_V(-.7,0,-.7));
SetCameraOffset (_V(11,-8,30));
oapiCameraSetCockpitDir (0,0);
}
}
....
if(key==OAPI_KEY_V)
{
CAM = CAM + 1;
if(CAM > 2) CAM = 1;
SelectCockpitView(CAM);
return 1;
}