qcrocknet 3 Posted February 23 Share Posted February 23 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 post Share on other sites
reepblue 726 Posted February 23 Share Posted February 23 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 Link to post Share on other sites
qcrocknet 3 Posted February 23 Author Share Posted February 23 Ah! Ok good to know. Thank you very much. 🙂 Quote Link to post Share on other sites
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.