hello,
i load my collada file. the collada consists of two objects.
i want to change the material at realtime... it works fine with only
object in the collada, but when want more than one objec. when i load
a texturesequence, both of the objects get the same texture.
[Embed(source="assets/texture.jpg")]
private var tex:Class;
[Embed(source="assets/torso_marble2.jpg")]
private var marble:Class;
var targetmat:MaterialData = model.materialLibrary.getMaterial("ID3");
targetmat.material = new BitmapMaterial(Cast.bitmap(tex));
var targetmat:MaterialData = model.materialLibrary.getMaterial("ID5");
targetmat.material = new BitmapMaterial(Cast.bitmap(marble));
in this case i get the marble texture for both of the objects, if i
change the order both of the objects get the tex texture?
where is the problem!? i use the away3d version 2.4.2. is it a problem
of away or is there a mistake in my code?
here is the collada codesnippet:
<library_materials>
<material id="ID3" name="quad">
<instance_effect url="#ID4"/>
</material>
<material id="ID5" name="lambert1">
<instance_effect url="#ID6"/>
</material>
</library_materials>
any ideas where the problems is?