Skip to content

Python bindings for Valve's OpenVR virtual reality SDK

License

Notifications You must be signed in to change notification settings

sanjibsur11/pyopenvr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyopenvr

Python bindings for Valve's OpenVR virtual reality SDK

Installation

Use

import sys
import time
import openvr

openvr.init(openvr.VRApplication_Scene)

poses_t = openvr.TrackedDevicePose_t * openvr.k_unMaxTrackedDeviceCount
poses = poses_t()

for i in range(100):
    openvr.VRCompositor().waitGetPoses(poses, len(poses), None, 0)
    hmd_pose = poses[openvr.k_unTrackedDeviceIndex_Hmd]
    print(hmd_pose.mDeviceToAbsoluteTracking)
    sys.stdout.flush()
    time.sleep(0.2)

openvr.shutdown()

About

Python bindings for Valve's OpenVR virtual reality SDK

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 55.4%
  • C++ 25.2%
  • C 14.4%
  • Perl 4.4%
  • Other 0.6%