![]() |
|
#2
|
|||
|
|||
|
So you want 6DOF movement with the keyboard and orientation with the mouse. This should work.
Code:
import vizcam viz.cam.setHandler(vizcam.KeyboardCamera(forward='w',backward='s', left='a',right='d',turnRight='e',turnLeft='q')) 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) |
|
|
Similar Threads
|
||||
| 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 |