MetalOS Posted August 26 Share Posted August 26 Good morning, I'm trying to use the VR function with my Quest3 but when I launch my project I only have a black screen in the headset. Here is my code. Thank you in advance for your help. --Initialze Steam (optional) --if not Steamworks.Initialize() then return 1 end --Load FreeImage plugin (optional) local fiplugin = LoadPlugin("Plugins/FITextureLoader") --Get the displays local displays = GetDisplays() --Create a window local window = CreateWindow("Test VR", 0, 0, 1080, 768, displays[1], WINDOW_CENTER | WINDOW_TITLEBAR) --Create a framebuffer local framebuffer = CreateFramebuffer(window) --Create a world local world = CreateWorld() --Get the VR headset local hmd = GetHmd(world) --Load a map local mapname = "Maps/start.ultra" local cl = CommandLine() if type(cl["map"]) == "string" then mapname = cl["map"] end local scene = LoadMap(world, mapname) while window:KeyDown(KEY_ESCAPE) == false and window:Closed() == false do --Garbage collection step collectgarbage() --Update the world world:Update() Steamworks.Update() --Render the world to the framebuffer world:Render(framebuffer) end Steamworks.Shutdown() Quote Link to comment Share on other sites More sharing options...
reepblue Posted August 27 Share Posted August 27 Dumb question but are you using the VRPlayer component? Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
MetalOS Posted August 27 Author Share Posted August 27 Sorry, I'm a beginner in programming. I don't think I'll use it. I added this command local hmd = GetHmd(world) thinking that it activated VR mode at the camera level. Quote Link to comment Share on other sites More sharing options...
MetalOS Posted August 27 Author Share Posted August 27 In the Ultra Engine documentation I can't find a VRplayer. Is this a Lua command? Quote Link to comment Share on other sites More sharing options...
Dreikblack Posted August 27 Share Posted August 27 54 minutes ago, MetalOS said: In the Ultra Engine documentation I can't find a VRplayer. Is this a Lua command? It's a Component. Start map have player player with third person camera component. Try to delete this model, add Empty and add VRPlayer component to this Empty Quote Link to comment Share on other sites More sharing options...
MetalOS Posted August 27 Author Share Posted August 27 OK, I understand. I hadn't seen that in the options of a camera I found the VRPlayer components. Thanks guys. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.