Vizard 7 » Tutorials & Examples » Vizard Introduction » Complete Application
7.6

Complete Application

To import the configuration file with Oculus, Vive, or desktop settings into the script, only two lines of code need to be added. The following line of code opens a render window with default mouse navigation:

viz.go()

Remove the line above and add the following code. This imports the vizconnect library and opens a render window with the settings saved in the configuration file:

import vizconnect
vizconnect.go('vizconnect_config.py')

The complete script should now be:

import viz
import vizfx
import vizconnect

vizconnect.go('vizconnect_config.py')
lobby = vizfx.addChild('lobby.osgb')
viz.MainView.getHeadLight().disable()

Run the script and you will be able to navigate the lobby scene using the hardware selected in Vizconnect:

Introduction

Script

Scene Model

Hardware Connection

Complete Application