www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: hayden621 on May 23, 2011, 10:18:00 am

Title: Object3D Transparency setting
Post by: hayden621 on May 23, 2011, 10:18:00 am
Hi, I am trying to a fade in effect by setting the transparency of an Object3D from 255 to 0 within onDrawFrame() method. However, I find the transparency is not changing and stays to be fully opaque disregard to my transparency setting. Does anyone know what is happening here and how should I solve this? Thanks!
Title: Re: Object3D Transparency setting
Post by: EgonOlsen on May 23, 2011, 10:22:18 am
At least 0-10 should make a difference. 255 is very high...transparency is calculated by a crude formula, it's not in the range of 0..255 unless you change the parameters in Config. Maybe it actually works, but because you are starting with such a high value, you aren't noticing any changes before giving up?
Title: Re: Object3D Transparency setting
Post by: hayden621 on May 23, 2011, 10:33:03 am
I have tried that too, and tried to print out isTransparent() of the object when setting the transparency to 0 and it is true, however it is still opaque on the screen.
Title: Re: Object3D Transparency setting
Post by: hayden621 on May 23, 2011, 10:45:53 am
Oh, I realized the problem, it's because my object is a group of animated 3d Object instead of one Object3D and I'd need to set the transparency for each animated 3D. Thanks!