View Single Post
  #6  
Old 03-16-2016, 12:46 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,448
In the following code the Oculus sensor data is applied to the viewpoint and the viewpoint is linked to a navigation node:

Code:
# Setup navigation node and link to main view
navigationNode = viz.addGroup()
viewLink = viz.link(navigationNode, viz.MainView)
viewLink.preMultLinkable(hmd.getSensor())
In your UpdateMovement function the joystick data should be used to update navigationNode rather than viz.MainView.

If you want to set this up directly through the code, I would recommend you start with the oculusExample.py script. Then swap out the lines that check for key events with joystick events in the UpdateView function.

The Vizconnect Introduction page describes the advantages of using vizconnect. The Vizconnect Tutorials are useful for learning vizconnect. To accomplish this same task in vizconnect, parent the display to the oculus tracker and then parent the tracker to a transport that's driven by joystick data.
Reply With Quote