Turn using keyboard when using Oculus
Hi guys,
I cannot figure out how to get the viewpoint to turn using a key binding. I can obviously turn my head in the oculus rift, but this is not practical for the application. I need to be able to turn using a key on the keyboard (or controller). Is this possible? I'm using the sample Oculus code that came with Vizard. Any help much appreciated, Seadna. |
I think there is a demo using keyboard to control a BMW car, and that one should work
|
have a look at "vizconnect" section in particular input, tracker and transport section. I think from memory you want to tie a keyboard input to the driving transport or maybe even pivot depends if you want to move around scene or just rotate.
|
Could you provide an example code snippet of how this would be done? I'm new to python and currently learning it through using Vizard.
|
Take a look at the 'Oculus Desktop Configuration' option in the vizconnect presets page. That adds a transport controlled by keyboard input signals.
|
Great I think i have found what I need. Now i need to figure out how to fit it into what i have already coded.
Thank you Jeff. |
OK I'm struggling with getting this into my code:
Code:
# Setup arrow key navigation I tried putting in m.preEuler(0,dm,0) and adding navigationMode.setEuler(m.getEuler(), viz.REL_PARENT) but that causes the view to rapidly spin constantly. |
Is there a reason you're trying to do this in your own script rather than use vizconnect?
|
I hadn't used visconnect until you mentioned it here and I already have a lot of script put together. I'm not sure how to integrate my script with the mass of script that visconnect created or how to take the script I need from visconnect to integrate with my own.
Its seems like it should be much easier than this but then I'm quite new to this so i don't really know. I have learned everything so far from looking at the demos and samples and the help file that came with Vizard, but i can't find out how to do this. Any help would be much appreciated! |
Take a look at the vizconnect tutorials. These will explain how to use the vizconnect config file in your own script.
|
All times are GMT -7. The time now is 08:06 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC