Вопрос

By default, the mouse buttons are assigned to camera control as:

  • Left: Translate
  • Right: Zoom
  • Scroll/middle: Rotate

How do I change these mouse button bindings so that I want this?:

  • Scroll/middle: Zoom
  • Left: Rotate
  • Right: Translate

I can see that the default mouse bindings for camera control are set in DirectCameraControl.py. But, how can I change them from my main class which is derived from ShowBase?

Это было полезно?

Решение

The camera controls in DirectCameraControl are separate from the default controls, and changing these settings will not affect the default camera. The default controls are hardcoded in panda/src/tform/trackball.cxx; it is presently not possible to change these.

The default camera controls are primarily intended for early development and debugging. For most purposes, you'll want to use base.disableMouse() to disable the default camera controls and develop your own camera control code.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top