WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Link vizconnect display to Viz.mainview (https://forum.worldviz.com/showthread.php?t=5971)

Rob 03-07-2017 08:29 AM

Link vizconnect display to Viz.mainview
 
Hey,

I want to link vizconnect display to viz.mainview so it inherits the same actions as whats being done for the mainview.

However, I cannot figure out how to do this.
Code:

vizconnect.go('vizconnect_config.py') ## Vizconnect movement
movement = vizconnect.getTransport('main_transport') ## links movement to the walking transport in viz connect
movement.setMovementSpeed(0) ## set movement speed to 0 for main menu scene
newobject = viz.add('beachball.osgb',scene=viz.Scene2)
newobject.setPosition([.5,50,0])
#viz.link(movement.getNode3d,newobject) ## this links movement but I cannot set a new Y position for the object at all.
#viz.link(vizconnect.getDisplay,viz.MainView) ## does not work either

How would i get it to link to the mainview without messing up anything thats been done?

Jeff 03-07-2017 08:16 PM

The display has a view associated with it, which is the mainview by default. If you parent the display to a tracker or transport the view will move with that tracker or transport. If you don't need to change the hierarchy on the fly then you can set the display's parent in the scenegraph of the vizconnect GUI.


All times are GMT -7. The time now is 11:10 PM.

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