Author Topic: Set multi texture in bones  (Read 13999 times)

Offline ngvannam5

  • byte
  • *
  • Posts: 7
    • View Profile
Set multi texture in bones
« on: April 25, 2012, 10:10:36 am »
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 ?

Offline ngvannam5

  • byte
  • *
  • Posts: 7
    • View Profile
Re: Set multi texture in bones
« Reply #1 on: April 26, 2012, 03:51:59 am »
Help me? help

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: Set multi texture in bones
« Reply #2 on: May 09, 2012, 08:52:08 am »
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
Code: [Select]
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