Panda3D Manual: The Default Camera DriverBy default, panda runs a task that enables you to move the camera using the mouse. This task will conflict with any code you write to move the camera. The task controls the camera by updating the camera's position every frame to where the mouse thinks it should be. This means that any other code that directly controls the camera will not seem to work, because it will be fighting the mouse for control. If you want to move the camera directly under show control, you must first disable the camera control task and then the camera will move as expected. base.disableMouse() The ShowBase class contains some handy methods to allow the user control over the camera. The The keyboard system uses the arrow keys. Up moves the camera forward, and down move it back. The left and right arrows turn the camera. The mouse system responds whenever any button is held. If the pointer is towards the top of the sceen, the camera moves forward. If it is towards the bottom, the camera moves backwards. If it is on either side, the camera rotates to that direction. The speed the camera moves is determined by how far from the center the mouse pointer is. Additionally, there is another command that allows control based on trackball mice. base.useDrive() base.useTrackball() ShowBase also provides the method base.oobe()
© Carnegie Mellon University 2010 |