This is a very simple library I am working on that will lower the barrier of entry for making VR games.
Here is an example script showing the simplicity of the library. (not production level code, just debug / testing level)
local Lib = game:GetService("ReplicatedStorage"):WaitForChild("VRLib") local VR = require(Lib) local Devices local getOn = function(button) local input, gpe = VR:GetInput(button) return input and not gpe and input.Position.Z > 0 end local char = script.Parent local RightBrick = char:WaitForChild("RightBrickTest") local RightBrick = char:WaitForChild("LeftBrickTest") local Body = char:WaitForChild("VRBody") local wasOn = false VR.OnUpdate:Connect(function(step) if getOn(Enum.KeyCode.ButtonL3) and getOn(Enum.KeyCode.ButtonR3) then if not wasOn then VR:Recenter() end wasOn = true else wasOn = false end -- used to "glue" the player to the seat or character VR.CFrame = Body.CFrame --these can be assigned to outside of the function too VR.Height = 4 VR.Scale = 1 Devices = VR.Devices RightBrick.CFrame = Devices.RightHand.CFrame LeftBrick.CFrame = Devices.LeftHand.CFrame VR:ApplyCamera() --call this to update the cameras location end)
There is a lot more to be added in the coming future, but in the meantime, it has adjustable height and scale settings, automatically moves the camera and provides hand and input access without having to do it separately, making it very easy to make a simple VR game.
Eventually I will try to support a simple VR character controller with hand tracking for arms and add different movement modes like teleport or snap turning in a easily usable way
Documentation has been recently updated as well