[quote][quote='Driklyn' pid='18923' dateline='1292141056']
You have to hide it, then draw it, and then show it once again.
Example code.
There are some tutorials on this. I believe one is called "Armor Rendering".
[/quote]
Tried it with my current code and it didn't work. It might be because the meshes are being loaded differently from example in armor rendering tutorial.
Instead of creating separate mesh parts etc I have a mesh file with mesh parts backed in already. Because the model is made up of separate parts in max I just only had to rename the parts via mesh editor to lets say tshirt, pants, head etc. I didn't really have the option to save it separably.
In the tutorial from what I understood the meshes boots, pants, gauntlets en main mesh are loaded in separably and then you can just most likely stop drawing one mesh?
However I want to do it with one whole mesh, I tried adding a bool to chr (npcs) and player which was true for players and false for npcs. But it didn't really work. I might be missing something... added the code below with screenshot.
Also I'm not creating players npcs etc code wise i'm getting them off the world like in other tutorials.
[img]
[/img]
[Quote]
// create the world
Game::World.init()
.setObjType(Statics,OBJ_STATIC )
.setObjType(Chrs ,OBJ_CHR )
.setObjType(Players,OBJ_PLAYER )
.setObjType(Items ,OBJ_ITEM )
.New ("world/testworld.world");
void Player::Draw()
{
if(hide_shirt == true)
{
mesh->hide("shirt");
}
__super::Draw(); // call default drawing
if(hide_shirt == false)
{
mesh->draw(cskel);
//mesh->show("shirt"); //Also tried this it didn't work
}
}
[/quote]