qcrocknet Posted February 23, 2021 Share Posted February 23, 2021 Hello, First, I am very new to Leadwerks and very impressed with the functionnalities and quality of this engine. I bought the professional version mainly for VR purposes. While experimenting with the VR demo project I wanted to have some text shown after I clicked the trigger button (added in the VRPlayer.lua), but nothing is showing. I used the same code in FPSPlayer and it does show. Am I doing something wrong? if VR:GetControllerButtonHit(VR.Left + n, VR.TriggerButton)==true then context:SetFont(self.font) context:SetBlendMode(Blend.Alpha) context:SetColor(1,0.1,0.1) context:SetBlendMode(Blend.Alpha) context:DrawText("Test 1",160,70) local fh=self.font:GetHeight() context:DrawText(Test 2",(context:GetWidth()-self.font:GetTextWidth(text))/2,(context:GetHeight()-fh)/2-fh*1.5) context:SetBlendMode(Blend.Solid) ...... I am using the Oculus Quest 2 with a link connection. I see the proper controller models and can pickup the blocks and teleport around. Windows 10, latest NVIDIA drivers, latest Oculus drivers/app, latest SteamVR. Thank you very much in advance. Martin 1 Quote Link to comment Share on other sites More sharing options...
reepblue Posted February 23, 2021 Share Posted February 23, 2021 You can't draw to the context in vr. The result will print on the preview window but not the hmd. You need to make the text into a sprite in 3D space. 1 1 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...
qcrocknet Posted February 23, 2021 Author Share Posted February 23, 2021 Ah! Ok good to know. Thank you very much. ? 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.