UMMU Ummu and VC

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,711
Reaction score
2,683
Points
203
Location
Dallas, TX
I have run into a odd meshing issue. Not sure why this does it so I can fix it.

But I have a vessel that is Ummu capable. When the number of crew is 1 it shows a mesh of the Ummu inside.

Ok. No problem. But if I eva and get back in both the main and VC mesh are seen.

Code:
SetMeshVisibilityMode (AddMesh (oapiLoadMeshGlobal ("2001POD2a")), MESHVIS_ALWAYS ); //Main ship mesh
MAINVC = AddMesh (oapiLoadMeshGlobal ("2001pod2avc"));
SetMeshVisibilityMode (MAINVC, MESHVIS_VC);
BUG1 = AddMesh (oapiLoadMeshGlobal ("PODUMMU"));
SetMeshVisibilityMode (BUG1, MESHVIS_NEVER);
BUG2 = AddMesh (oapiLoadMeshGlobal ("PODUMMU1"));
SetMeshVisibilityMode (BUG2, MESHVIS_NEVER);


bool POD2001::clbkLoadVC(int id)
{
//VCHUDSPEC hud;
VCMFDSPEC mfd;

if((id>=0)&&(id<1)){
if(id==0){
SetCameraDefaultDirection(_V(0,0,1));
SetCameraOffset(_V(0,.6,-.6));
SetCameraShiftRange(_V(0,0,0.1),_V(-0.2,0,0),_V(0.2,0,0));
oapiVCSetNeighbours(-1,-1,-1,-1);

//hud.nmesh=1;
//hud.ngroup=116;
//hud.hudcnt=_V(0, 0, 0);
//hud.size=.25;
//oapiVCRegisterHUD(&hud);
mfd.ngroup=118;
mfd.nmesh=1;
oapiVCRegisterMFD(0,&mfd);
mfd.ngroup=119;
mfd.nmesh=1;
oapiVCRegisterMFD(1,&mfd);
}
}
return 1;
}

In the VC I just have the MFD's seen not the HUD
 

Hlynkacg

Aspiring rocket scientist
Addon Developer
Tutorial Publisher
Donator
Joined
Dec 27, 2010
Messages
1,870
Reaction score
3
Points
0
Location
San Diego
Are you adding and deleting the meshes each time you EVA or are you simply changing thier visibility mode?
 

BruceJohnJennerLawso

Dread Lord of the Idiots
Addon Developer
Joined
Apr 14, 2012
Messages
2,585
Reaction score
0
Points
36
Are you adding and deleting the meshes each time you EVA or are you simply changing thier visibility mode?

Clearmeshes (); might help if that is the problem. I call it under a mesh update function before adding meshes each time I want to make a change to what meshes my ship is displaying.
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,711
Reaction score
2,683
Points
203
Location
Dallas, TX
Code:
const char *p1MiscID = Crew.GetCrewMiscIdBySlotNumber(0);

if(Crew.GetCrewTotalNumber()==0){

SetMeshVisibilityMode( BUG1, MESHVIS_NEVER ); 
SetMeshVisibilityMode( BUG2, MESHVIS_NEVER ); 

}



if(Crew.GetCrewTotalNumber()==1){
   //show only correct mesh
if(!_strnicmp(p1MiscID,"201R",5))SetMeshVisibilityMode( BUG1, MESHVIS_ALWAYS ); //show VIP
if(!_strnicmp(p1MiscID,"201Y",5))SetMeshVisibilityMode( BUG2, MESHVIS_ALWAYS ); //show doc

}

Just changeS the visibility

Here is an image:
https://dl.dropbox.com/u/71242599/podummuissue.jpg
left side Ummu inside. he exits and reenters. then the right side. If I press F8 it goes back to normal
 

Hlynkacg

Aspiring rocket scientist
Addon Developer
Tutorial Publisher
Donator
Joined
Dec 27, 2010
Messages
1,870
Reaction score
3
Points
0
Location
San Diego
Clearmeshes (); might help if that is the problem. I call it under a mesh update function before adding meshes each time I want to make a change to what meshes my ship is displaying.

That's your issue right there. You're basically copy/pasting multiple meshes on top of each other.

It's much more efficient to load them once and then change the visibility mode. Only delete a mesh if you have no intention of using it again. On stage separation for instance.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,711
Reaction score
2,683
Points
203
Location
Dallas, TX
Code:
SetMeshVisibilityMode (AddMesh (oapiLoadMeshGlobal ("2001POD2a")), MESHVIS_ALWAYS ); //Main ship mesh
MAINVC = AddMesh (oapiLoadMeshGlobal ("2001pod2avc"));
SetMeshVisibilityMode (MAINVC, MESHVIS_VC);
BUG1 = AddMesh (oapiLoadMeshGlobal ("PODUMMU"));
SetMeshVisibilityMode (BUG1, MESHVIS_NEVER);
BUG2 = AddMesh (oapiLoadMeshGlobal ("PODUMMU1"));
SetMeshVisibilityMode (BUG2, MESHVIS_NEVER);

and then I just change the visibilty
Code:
const char *p1MiscID = Crew.GetCrewMiscIdBySlotNumber(0);

if(Crew.GetCrewTotalNumber()==0){

SetMeshVisibilityMode( BUG1, MESHVIS_NEVER ); 
SetMeshVisibilityMode( BUG2, MESHVIS_NEVER ); 

}



if(Crew.GetCrewTotalNumber()==1){
   //show only correct mesh
if(!_strnicmp(p1MiscID,"201R",5))SetMeshVisibilityMode( BUG1, MESHVIS_ALWAYS ); //show VIP
if(!_strnicmp(p1MiscID,"201Y",5))SetMeshVisibilityMode( BUG2, MESHVIS_ALWAYS ); //show doc

}
 
Top