Author Topic: Material Alpha  (Read 111 times)

Zero Poid   «   on: June 20, 2012, 02:49:08 PM »
How to set semi-trancperency to separated child object of loaded model. Please advice some code example.

Ivan Vodopiviz   «   Reply #1 on: June 21, 2012, 12:43:39 PM »
Hi,

It depends on your material. For example, if your material only has a ColorFilter, you can set the alpha like this:

var alpha:Number = 0.5;
var newMaterial:Shader3D = new Shader3D( "", [new ColorFilter( 0x0000ff, alpha )] );

Please note that if  all your child objects are sharing the same material, you'll have to create a new one instead of modifying the one you already have. Then you can get your child and change its material like this:

pivot.material = yourNewAlphaMaterial;

Regards