❄️🎁⛄ The Winter Games Tournament is Live! 🎄🎅❄️
Jump to content

CreateTile not transparent


Go to solution Solved by Josh,

Recommended Posts

Posted

Wireframe as expected:

splashtile = CreateTile(world, 640, 480, true)

image.png.b0fe209111089dc9fea0986a0805697c.png

Shouldn't this tile be transparent? It's transparent for text.

splashtile = CreateTile(world, 640, 480, false)

image.png.63923fe72231db159adfc52dcec3c010.png

This has no influence on transparency set to 50%:

splashtile = CreateTile(world, 640, 480, false)
splashtile:SetColor(1, 1, 1, 0.5)

 image.png.b1f44cfd8d693693a7aea35cfaaa8cfc.png

--Get the displays
local displays = GetDisplays()

-- Create a window
local window = CreateWindow("Lost", 0, 0, 1280, 720, displays[1], WINDOW_CENTER | WINDOW_TITLEBAR)

-- Create a world
local world = CreateWorld()

-- Create a framebuffer
local framebuffer = CreateFramebuffer(window)

-- Create a camera
local camera = CreateCamera(world)
camera:SetClearColor(0.125)
camera:SetPosition(0, 0, -4)
    
-- Create a light
local light = CreateBoxLight(world)
light:SetRotation(45, 35, 0)
light:SetRange(-10, 10)
light:SetColor(2)

-- Create a model
local model = CreateBox(world)
model:SetColor(0, 0, 1)
    
splashtile = CreateTile(world,640,480,false)
splashtile:SetColor(1,1,1,0.5)
    
-- Main loop
while not window:Closed() do    
       
    model:Turn(0, 1, 0)
    
    world:Update()
    world:Render(framebuffer, true)
        
end

 

  • Solution
Posted
splashtile = CreateTile(world,640,480,false)
splashtile:SetColor(1,1,1,0.5)

local mtl = CreateMaterial()
mtl:SetTransparent(true)
splashtile:SetMaterial(mtl)

 

Let's build cool stuff and have fun. :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...