andrake
Member
|
change material or color for one of instance of the same model
Hi
i try to make IK++ like game(karateka)
there it two players. i use the same model for 1st and 2nd player.
how can i change material or color of material for one of players instance.
i use this code for instaciating players
Code:
chr=UID(271285501, 1133143490, 3185714357, 2121966353);
chr->mesh()->scale(scale);
mtrx.move(pos);
cskel.create(chr->mesh()->skeleton(), 1.7);
|
|
04-22-2014 05:20 PM |
|
andrake
Member
|
RE: change material or color for one of instance of the same model
it's in render cycle
i use/draw for kimono other material and for body i use default material
Code:
void drawunit()
{
MaterialLock = Materials(UID(2390851165, 1317256765, 1535852195, 3501406879));
chr->mesh()->parts.first().draw(cskel);
MaterialLock = NULL;
chr->mesh()->parts.addr(1).draw(cskel);
}
|
|
04-22-2014 06:40 PM |
|