WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Vizconnect and MainView (https://forum.worldviz.com/showthread.php?t=5488)

craigpet 08-27-2015 08:36 AM

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?

Jeff 08-27-2015 04:30 PM

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)


Jeff 08-27-2015 04:41 PM

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


All times are GMT -7. The time now is 10:41 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC