SetCameraOffset (_V(-.6,1.5,0));
SetCameraDefaultDirection (_V(0,1,0));
case 0: //ext
SetCameraDefaultDirection (_V(0,1,0));
SetCameraOffset (_V(-.6,1.5,0));
oapiCameraSetCockpitDir (0,0);
case 3: //rear
SetCameraDefaultDirection (_V(0,-1,0));
SetCameraOffset (_V(0,.8,0));
oapiCameraSetCockpitDir (0,0);
break;
case 0: //ext
SetCameraDefaultDirection (_V(0,1,0));
SetCameraOffset (_V(-.6,5,0));
oapiCameraSetCockpitDir (0,0);
break;
case 1: //PAD1
SetCameraDefaultDirection (_V(0,1,0));
SetCameraOffset (_V(.6,5,0));
oapiCameraSetCockpitDir (0,0);
break;
case 2: //PAD1
SetCameraDefaultDirection (_V(1,.98,-.15));
SetCameraOffset (_V(.5,4.3,.061));
oapiCameraSetCockpitDir (0,0);
break;
case 3: //PAD1
SetCameraDefaultDirection (_V(0,-1,0));
SetCameraOffset (_V(0,.8,0));
oapiCameraSetCockpitDir (0,0);
break;
SetMeshVisibilityMode (AddMesh (oapiLoadMeshGlobal ("ultraprobecm3")), MESHVIS_EXTERNAL); //Main ship mesh
SetMeshVisibilityMode (AddMesh (oapiLoadMeshGlobal ("ultraprobecm3interior")), MESHVIS_COCKPIT); //Main ship mesh
bool UPROBEFRONT::clbkLoadVC (int id)
{
SetCameraOffset (_V(0,1.5,6.0));
SetCameraDefaultDirection (_V(0,0,1));
SetCameraRotationRange (RAD*120, RAD*120, RAD*70, RAD*70);
SetCameraShiftRange (_V(0,0,0.1), _V(-0.2,0,0), _V(0.2,0,0));
}
bool UPROBEFRONT::clbkLoadVC (int id);
but I get this error.
c:\orbiter2010p1\orbitersdk\samples\uprobefront\uprobefront.cpp(262) : error C4716: 'UPROBEFRONT::clbkLoadVC' : must return a value
bool UPROBEFRONT::clbkLoadVC (int id)
{
SetCameraOffset (_V(0,1.5,6.0));
SetCameraDefaultDirection (_V(0,0,1));
SetCameraRotationRange (RAD*120, RAD*120, RAD*70, RAD*70);
SetCameraShiftRange (_V(0,0,0.1), _V(-0.2,0,0), _V(0.2,0,0));
[highlight]return true;[/highlight]
}
API_reference.pdf said:virtual bool VESSEL2::clbkLoadVC (int id) [virtual]
3-D virtual cockpit view mode request notification
Called when Orbiter tries to switch the cockpit view to a 3-D virtual cockpit mode (for example in response to the user switching cockpit modes with F8).
Parameters:id virtual cockpit identifier (>= 0)
Returns:true if the vessel supports the requested virtual cockpit, false otherwise.
Default action:None, returning false (i.e. virtual cockpit mode not supported).
SetMeshVisibilityMode (AddMesh (oapiLoadMeshGlobal ("ultraprobecm3")), MESHVIS_EXTERNAL); //Main ship mesh
//SetMeshVisibilityMode (AddMesh (oapiLoadMeshGlobal ("ultraprobecm3interior")), MESHVIS_COCKPIT); //Main ship mesh
SetMeshVisibilityMode (AddMesh (oapiLoadMeshGlobal ("ultraprobecm3interior")), MESHVIS_VC); //Main ship mesh
}
bool UPROBEFRONT::clbkLoadVC (int id)
{
SetCameraOffset (_V(-.6,5,0));
SetCameraDefaultDirection (_V(0,1,0));
SetCameraRotationRange (RAD*120, RAD*120, RAD*70, RAD*70);
SetCameraShiftRange (_V(0,0,0.1), _V(-0.2,0,0), _V(0.2,0,0));
return true;
}