- Home /
Transparent game objects
I'm working on HoMM3 clone. I use a map made of 3D tiles (they're going to be hexes soon) and wanted to use 2D graphics for all the map elements such as obstacles AND the creatures. As for now (pic related) I made a plane and added the dragon graphic to it - I use OnMouseUp() to change dragon's transform.position on the tile's one.
My only problem (for now) is that the plane or any other cube object has it's own white color (dragon's bg is transparent). Is there a way to just show graphics I need? I need them to be on GameObjects
Answer by Piflik · Sep 25, 2011 at 12:58 PM
Use a transparent shader.
this makes the whole object including the picture transparent
It should be transparent according to the picture's alpha channel.
Answer by gshomali · Sep 25, 2011 at 03:04 PM
Here's how you can do it:
1- Create a Plane game object. 2- Create a material of type Particle->Alpha Blended and use your dragon image as a texture. 3- Scale down the created plane to the size suitable to your game.
Regards.
Answer by gshomali · Sep 25, 2011 at 03:04 PM
1- Create a Plane game object. 2- Create a material of type Particle->Alpha Blended as long as you don't need it to respond to light. 3- Use your picture as a texture for that material. 4- Assign that material to the plane.
Answer by unluckyBastard · Sep 25, 2011 at 03:10 PM
Save it as PNG, with Index Transparency. Or make the BG black and use Grayscale as Alpha, first ones better though.
Your answer