Author Topic: Object3D.mergeObjects and setTransparency  (Read 1864 times)

Offline rainfalls

  • byte
  • *
  • Posts: 27
    • View Profile
Object3D.mergeObjects and setTransparency
« on: June 01, 2012, 01:01:04 am »
I'm not sure if this is a bug or intended. With this code:

Code: [Select]
mesh_0.setTransparency(255);
mesh_0.setTexture("tex_with_alpha");
mesh_1.setTexture("tex_solid");
Object3D mesh = Object3D.mergeObjects(mesh_0, mesh_1);

Then the mesh_0 part loses the alpha setting (100% transparency --> black).

Sorry if this has been discussed before.
(Tested on Sony Ericsson Xperia Play.)
« Last Edit: June 01, 2012, 01:02:43 am by rainfalls »

Offline zammbi

  • float
  • ****
  • Posts: 360
    • View Profile
Re: Object3D.mergeObjects and setTransparency
« Reply #1 on: June 01, 2012, 01:19:08 am »
I believe you need to call "setTransparency;" again on the merged object to say to use the alpha channel.
If you don't want the whole object transparent then you will need to keep them separate.
« Last Edit: June 01, 2012, 01:21:32 am by zammbi »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Object3D.mergeObjects and setTransparency
« Reply #2 on: June 01, 2012, 08:53:45 am »
Transparency is per Object. It's intended and not a bug.