Delta Engine
»
Support
»
Rendering
»
BillboardManager transparent or how to make 2D games
Joined: 8/22/2011(UTC) Posts: 170 Location: Moscow
Thanks: 3 times Was thanked: 2 time(s) in 2 post(s)
|
Hello. Need help. I want to make a camera in 2d. 1.Need to use BillboardManager and Camera.(???) 2.But how to make textures transparent? (see screenshot).
Quote:I found my mistake  . Why 1 Billboard have not transparent? mb its bug? How to make textures overlap? How create onclick (mouse) Billboard eventOr what methods to solve the problem (2d game with camera)Code:
[Test]
public static void DrawBillboard3D()
{
LookAtCamera cam = new LookAtCamera(new Vector(0f, -4f, 0f));
MaterialColored billboard = new MaterialColored("DeltaEngineLogo");
MaterialColored billboard2 = new MaterialColored("DeltaEngineLogo");
Size size = new Size(2f, 2f);
float r = 0f;
Application.Start(delegate
{
Grid.Draw();
size = new Size(2f, 2f);
billboard.billboardMode = BillboardMode.UpAxis;
BillboardManager.Instance.Draw(billboard, new Vector(0f, 0f, 0),
size, r);
size = new Size(10f, 10f);
billboard2.billboardMode = BillboardMode.UpAxis;
BillboardManager.Instance.Draw(billboard2, new Vector(0f, 0.1f, 0),
size, r);
if (Input.Mouse.LeftButtonReleased)
{
Application.BackgroundColor = Color.Random;
}
});
}
Edited by user Monday, November 21, 2011 3:53:21 PM(UTC)
| Reason: Not specified bfox attached the following image(s):  123.png (158kb) downloaded 16 time(s).You cannot view/download attachments. Try to login or register. |
Russian game developer. Давайте делать игры в команде. Идет набор. |
|
|
|
Delta Engine
»
Support
»
Rendering
»
BillboardManager transparent or how to make 2D games
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.