Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: nepomuk on May 21, 2014, 04:09:46 AM

Title: transparency
Post by: nepomuk on May 21, 2014, 04:09:46 AM
is there a way to set transparency/visibility of gameobjects to a certain amound?

i'd like to have my objects slowly fade invisible before destroying them..

regards :)
Title: Re: transparency
Post by: Breadman on May 21, 2014, 04:26:20 PM
Transparency is handled by the material that's applied to your objects.

I create duplicate materials (magenta _100, magenta_65, etc) where the number prefix is the opacity of the material. I then use the "set material" action to add these changes.

You can also try the "set material color" action which will give you control over the material's opacity as well - just keep ind mind this will affect all objects with that material assigned to it, which may or may not be what you need :D
Title: Re: transparency
Post by: TrentSterling on May 21, 2014, 05:35:05 PM
If you're using vertex colors/2d stuff, it's as simple as changing the vertex colors/alpha color on the sprite renderer.

Doing it via material can add a lot of unneeded draw calls, but its sort of a complex issue for a fully 3d scene.