#1
|
|||
|
|||
Vizconnect and MainView
I have a vizard script that makes frequent use of the viz.MainView object and its functions, including setting its position/euler/velocity, getting the MainView's position/euler, and running actions on the MainView (specifically vizact.spinTo). However, I need to adapt this script to now function with user input in the form of a joystick and Inertial Labs orientation tracker, as well as display the scene on an nVisor ST50. This seems simplest to do using vizconnect, yet utilizing vizconnect, to my neverending frustration, disables the ability to control the camera with viz.MainView. I've looked at the forum and found the thread on how to control the display's position and partial orientation using viewpoints (I couldn't get the example code to reset the pitch), but nothing on how I might find the display's current position/orientation or how I might apply actions to it, like vizact.spinTo. Would it be easier to perhaps not use vizconnect at all?
|
#2
|
|||
|
|||
Take a look at the jumpTo and orbit transports in vizconnect. Those help to move the user around the environment. You could also try adding a group node above the display node in the scenegraph and then apply actions to the group node.
You can get the viewpoint position and orientation using the standard Vizard commands even if the viewpoint is controlled by vizconnect objects: Code:
view = viz.MainView def printViewData(): print 'pos',view.getPosition() print 'euler',view.getEuler() vizact.ontimer(1,printViewData) |
#3
|
|||
|
|||
A few other transports that maybe helpful to you:
wand magic carpet: supports directional movements using input signals relative to the sensor orientation. walking: supports moving around the scene in a walking style using input signals |
Tags |
joystick, mainview, position, tracker, vizconnect |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to set the position of view with vizconnect | apenngrace | Vizard | 1 | 08-04-2015 01:01 PM |
In there a way in Vizconnect to allow user to select between different input devices | JB_HP_Viz | Vizard | 2 | 11-05-2014 01:40 PM |