WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-04-2014, 01:12 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
In the script that imports the vizconnect config you'll want to get a handle to the display (which includes the viewpoint) and whatever trackers/transports you'll want to set as the parent of the display. Then you can change the display's parent through the code. Here's a simple example:

Code:
import viz
import vizact
import vizconnect

vizconnect.go('vizconnect_config.py')
viz.addChild('piazza.osgb')

keyTracker = vizconnect.getTracker('keyboard')
mouseKeyTracker = vizconnect.getTracker('mouse_and_keyboard_walking')

display = vizconnect.getDisplay()

vizact.onkeydown('1',display.setParent,keyTracker)
vizact.onkeydown('2',display.setParent,mouseKeyTracker)
Reply With Quote
  #2  
Old 11-05-2014, 01:40 PM
JB_HP_Viz JB_HP_Viz is offline
Member
 
Join Date: Jun 2014
Posts: 31
Thank you. Just tested, works great.

John
Reply With Quote
Reply


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
multi user environment tutorial maya Vizard 0 11-23-2013 09:35 AM
User keyboard input without halting the program Zhi Vizard 2 06-23-2011 01:53 PM
Controlling User Input ohad Vizard 1 03-15-2010 06:16 PM
User Input Hodge1620 Vizard 2 11-17-2005 07:58 AM
user input problem Jerry Vizard 1 11-16-2005 04:15 PM


All times are GMT -7. The time now is 08:43 AM.


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