Jump to content

Camera:Project in not bound for lua


Dreikblack
 Share

Go to solution Solved by Josh,

Recommended Posts

Need asap it for lua variation of my 3rd tutorial

-- Get the displays
local displays = GetDisplays()

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

-- Create a world
local world = CreateWorld()

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

-- Create light
local light = CreateBoxLight(world)
light:SetRange(-10, 10)
light:SetRotation(15, 15, 0)
light:SetColor(2)

-- Create camera
local camera = CreateCamera(world)
camera:SetClearColor(0.125)
camera:SetPosition(0, 0, -3)
camera:SetFov(70)

camera:Project(Vec3(0,0,0), framebuffer)

-- Main loop
while not window:Closed() and not window:KeyDown(KEY_ESCAPE) do
    -- Click on an object to change its color
    world:Update()
    world:Render(framebuffer)
end

 

Link to comment
Share on other sites

  • Solution

All these changes will be included in today's build.

Camera::UnProject will be called Unproject in Lua, and will later get changed in C++ as well.

  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...