Search the Community
Showing results for tags 'vr'.
-
Hi everyone. New to Leadwerks, what a fantastic tool! Question: has anyone developed a vr movement script that does not use teleporting? I have zero lua experience, trying to learn as I go. Thanks in advance for any assistance! Doogie
-
Hi, I have some switches and doors (SwingingDoors) that have Use function and calls to open or light up the rooms. But now I want that when my VR controller collide with the door or the light, first detect that I can "interact" with it (atm painting a Sphere...) and when I click on controller trigger, call to "Use" function of the collided entity (door or switch). Now, I replicated the code from FPSPlayer to interact with the E Key, and is "working" but is very awful I'm trying to write what I'm doing (very very very bad) on VRPlayer function Script:UpdateWorld() local pickInfo = PickInfo() --Usable object with Trigger Button: DANI if VR:GetControllerButtonDown(VR.Right,VR.TriggerButton)==true then local p0 = controller:GetPosition(true) local p1 = Transform:Point(0,0,self.useDistance,controller,nil) if self.entity.world:Pick(p0,p1, pickInfo, self.pickradius, true) then --Looks for any entity in the hierarchy that has a "Use" function local usableentity = self:FindUsableEntity(pickInfo.entity) if usableentity~=nil then --Use the object, whatever it may be usableentity.script:Use(self) end end end self.canUse = false pickInfo = PickInfo() local p0 = controller:GetPosition() local p1 = Transform:Point(self.useDistance,self.useDistance,self.useDistance,controller,nil) if self.entity.world:Pick(p0,p1, pickInfo, self.pickradius, true) then if self:FindUsableEntity(pickInfo.entity)~=nil then self.picksphere:SetPosition(pickInfo.position); self.canUse=true else local mass = pickInfo.entity:GetMass() if mass>0 and mass<=self.maxcarryweight then self.canUse = true end end else self.picksphere:SetPosition(0,0,0) end
-
Hello; Using Leadwerks Editor 4.5 with VR enabled (VR:Enable()in script). I have only the left eye rendered. Is there an extra step to do ? Like updating the shaders ?
-
Hey all, I'm playing with VR and I wanted to create something you'd find in Robo Recall in which the player can change the direction they want to face after a teleport. I did the becon rotating and it was all ready to go until I found out that no matter If I rotated the camera or player, OpenVR took priority on what was north south east and west. Is there a way to do this in lua and/or C++? I have a Oculus Rift with very limited play space so I wanted to have this feature for playing around.
-
hi all, is the c++ version of leadwerks the only way to do VR ? or can i just change the mail lua .script to work with htc vive ? like this ? Enabling VR in your game could not be easier. Just use the Window::VRDisplay creation flag when you create your game's window, and you're done. Really, that's all it takes: Window* window = Window::Create("My VR Game",0,0,1024,768,Window::Titlebar|Window::VRDisplay); Or in Lua: local window = Window:Create("My VR Game",0,0,1024,768,Window.Titlebar + Window.VRDisplay) cheers