WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-27-2015, 09:36 AM
craigpet craigpet is offline
Member
 
Join Date: Aug 2015
Posts: 6
Post 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?
Reply With Quote
  #2  
Old 08-27-2015, 05:30 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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)
Reply With Quote
  #3  
Old 08-27-2015, 05:41 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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
Reply With Quote
Reply

Tags
joystick, mainview, position, tracker, vizconnect

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


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


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