#1
|
|||
|
|||
Changing scenes with proximity sensors
Hi is there a way to change your viewpoint position when changing from one scene to another? also I'm trying to change a scene once the viewpoint goes into a proximity sensor. How would I go about doing that?
|
#2
|
|||
|
|||
You could create a function that sets a new viewpoint position when the scene changes:
Code:
''' Press 1 for scene1 Press 2 for scene2 ''' import viz import vizact import vizinfo vizinfo.InfoPanel() viz.go() viz.addChild('piazza.osgb') viz.addChild('dojo.osgb',scene=viz.Scene2) def changeScene(scene): viz.MainWindow.setScene(scene) if scene == viz.Scene1: viz.MainView.setPosition([0,1.8,0]) else: viz.MainView.setPosition([0,4,0]) vizact.onkeydown('1',changeScene,viz.Scene1) vizact.onkeydown('2',changeScene,viz.Scene2) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Orientation selective (Viewing Vector) Proximity Sensor | lmGehrke | Vizard | 2 | 03-17-2015 12:31 PM |
Changing parent without changing absolute global position? | The SundanceKid | Vizard | 2 | 05-23-2014 02:43 PM |
CompositeShape proximity sensor | mhtong | Vizard | 1 | 09-24-2012 11:18 AM |
Phase Space and Proximity Sensors | snovob93 | Vizard | 3 | 06-13-2012 12:32 PM |
Adding Objects to all Scenes | jassel41 | Vizard | 1 | 11-29-2010 02:35 AM |