Leadwerks Game Engine is the easiest way to build 3D games. With a rapid development pipeline, support for Lua and C++ programming, and plenty of learning materials, Leadwerks is the perfect way to learn to make games.

Post news Report RSS Leadwerks support for Oculus Rift enters open beta

Leadwerks Game Engine support for Oculus Rift has entered beta, with support for the DK1 and DK2 virtual reality headsets.

Posted by on

Leadwerks Game Engine support for Oculus Rift has entered beta, with support for the DK1 and DK2 virtual reality headsets. To enable virtual reality mode in your game, just add the Window.VRDisplay flag when your game's window is created, and the rest is automatic:

code:
local window = Window:Create("My VR Game",0,0,1024,768,Window.Titlebar + Window.VRDisplay)

Or in C++:

code:
Window* window = Window::Create("My VR Game",0,0,1024,768,Window::Titlebar|Window::VRDisplay);

New Commands

Four new commands will help you refine your VR experience:

code:
Vec3 VR::GetHeadRotation()

Use this to modify the way your controls work. For example, use the player's head rotation to change the direction they move in when a key is pressed. You do not need to rotate the camera yourself, as this is done automatically.

code:
Vec3 VR::GetHeadPosition()

This command would be useful if you're doing any line-of-sight tests with the player.

code:
void VR::Recenter()

Recenters the headset orientation according to the current position and rotation.

code:
void VR::HideWarning()

Disable the Oculus warning popup, typically by pressing space or another key.

Beta Limitations

Oculus Rift beta support is presently only available for Windows, and does not yet allow 2D drawing in VR mode. We expect to have our implementation complete, for Windows and Linux, by the end of the year.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: