![]() |
#1
|
|||
|
|||
Mouselook & Keyboard Navigation
We are building a virtual training environment. And we would like to implement 'mouselook' and the standard FPS keyboard movement keys. We have it set up to move with the keyboard and it works fine:
keyTracker =viztracker.Keyboard6DOF(forward='w',backward='s', left='a',right='d',turnRight='e',turnLeft='q') keyLink = viz.link(keyTracker, viz.MainView) keyLink.enable() And we can do 'mouselook' how we want it: def mousemove(e): euler = view.get(viz.HEAD_EULER) euler[0] += e.dx*0.1 euler[1] += -e.dy*0.1 euler[1] = viz.clamp(euler[1],-90.0,90.0) view.rotate(euler,viz.HEAD_ORI) viz.callback(viz.MOUSE_MOVE_EVENT,mousemove) viz.setMouseOverride() However, when we try to implement both in the same program, one overrides the other and we only get one of the two navigation modes. I assume this is because we are implementing the two navigation modes in different ways. Does anyone have some quick and easy code that will allow for navigation using both methods? |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question about input from virtual keyboard. | yyang | Vizard | 4 | 12-23-2008 01:25 PM |
navigation in cave environment | Andy | Vizard | 4 | 03-28-2008 02:32 AM |
On Screen Keyboard | betancourtb82 | Vizard | 14 | 10-03-2006 01:38 PM |
Multiple Viewports in Vizard, Utilizing keyboard callback | shivanangel | Vizard | 2 | 02-21-2006 05:56 PM |
Navigation Speed/Too Slow | Plasma | Vizard | 2 | 01-28-2004 12:07 PM |