Set multi texture in bones

Started by ngvannam5, April 25, 2012, 10:10:36 AM

Previous topic - Next topic

ngvannam5

help Me,
TextureManager.getInstance().addTexture("skin", genieskintex);
  TextureManager.getInstance().addTexture("cloth", genieclothtex);
  TextureManager.getInstance().addTexture("apha", genieaphatex);
  TextureManager.getInstance().addTexture("hair", geniehairtex);
 
 
  for (Animated3D a : masterNinja) {
   a.setTexture("skin");
   a.setTexture("cloth");
   a.setTexture("apha");
   a.setTexture("hair");
  }
 
  for (AnimatedGroup group : ninjas) {
   for (Animated3D a : group) {
    a.setTexture("skin");
    a.setTexture("cloth");
    a.setTexture("apha");
    a.setTexture("hair");
   }
  }

Then  setTexture the last one setTexture("hair"), no setTexture skin, cloth and apha ?


raft

sorry for late answer. I somehow didn't notice this

in loop you are setting textures of all Animated3D's, not individual ones.

do this
masterNinja.get(0).setTexture(..);
masterNinja.get(1).setTexture(..);


note, this is not multitexturing. this way you are setting textures of individual Animated3D's, not parts of an single Animated3D