Created
June 26, 2013 15:07
-
-
Save lubosz/5868193 to your computer and use it in GitHub Desktop.
get oculus rift input in BGE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from game_engine_rift.rift import PyRift | |
def poll(rift): | |
rift.poll() | |
bge.logic.rotation = Quaternion((rift.rotation[0], | |
rift.rotation[1], | |
rift.rotation[2], | |
rift.rotation[3])) | |
try: | |
poll(bge.logic.rift) | |
except AttributeError: | |
bge.logic.rift = PyRift() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you tried:
This way you create the quaternion as WXYZ, as Blender expects it. I haven't tried, but you probably won't need your 'fix' either, once you use that.