- Joined
- Jun 6, 2012
- Messages
- 317
- Reaction score
- 121
- Points
- 43
- Location
- Sydney, Australia, Earth, Sol
- Website
- www.orbithangar.com
hey, i am trying to code a vessel that has two cockpits. i have it set up so that the user can toggle between cockpits by pressing the usual F8. but i am having some trouble. this is what i have so far:
this seems to work fine for me, but i can't seem to be able to switch between the two cases, i can only see case 0. i anyone knows how to help, i would love to hear your ideas.
Code:
bool Pegasus::clbkLoadVC (int id)
{
switch (id) {
case 0: // CM camera
SetCameraOffset (_V(0, -21.74421, 68.68874));
oapiCameraSetCockpitDir(0,0);
oapiVCSetNeighbours (-1, -1, -1, 1);
break;
case 1: // cockpit
SetCameraOffset (_V(0, 21.74421, 92.60211));
oapiCameraSetCockpitDir(0,0);
oapiVCSetNeighbours (-1, -1, 0, 2);
break;
break;
default:
return false;
}
return true;
}
this seems to work fine for me, but i can't seem to be able to switch between the two cases, i can only see case 0. i anyone knows how to help, i would love to hear your ideas.
Last edited: