Click or drag to resize
Ab4d.SharpEngine logo

ManualMouseCameraControllerRotateCameraConditions Property

Gets or sets conditions from MouseAndKeyboardConditions enum that must be met to rotate the camera. Default value is MouseAndKeyboardConditions.LeftMouseButtonPressed.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 1.0.8740+deb2991acfe86a95cca780cd4f82bcae2805c1a5
Syntax
C#
public MouseAndKeyboardConditions RotateCameraConditions { get; set; }

Property Value

MouseAndKeyboardConditions
Remarks

RotateCameraConditions gets or sets conditions from MouseAndKeyboardConditions enum that must be met to rotate the camera.

To specify which mouse button is used for rotation set RotateCameraConditions to MouseAndKeyboardConditions.LeftMouseButtonPressed, MouseAndKeyboardConditions.RightMouseButtonPressed or MouseAndKeyboardConditions.MiddleMouseButtonPressed.

To specify that a special modifier key must be also pressed, one of the following conditions can be added (with or operator) to the RotateCameraConditions: MouseAndKeyboardConditions.ShiftKey, MouseAndKeyboardConditions.AltKey or MouseAndKeyboardConditions.ControlKey.

To disable the camera rotation set RotateCameraConditions to MouseAndKeyboardConditions.Disabled.

Default value of RotateCameraConditions is MouseAndKeyboardConditions.LeftMouseButtonPressed.

To specify conditions to move the camera use MoveCameraConditions property. To specify conditions to start quick zooming the camera use QuickZoomConditions property.

Example

The following code sets the mouse camera controller to rotate the mouse with pressed left mouse button and to move the camera with pressed left mouse button and control key.

C#
MouseCameraController1.RotateCameraConditions = MouseAndKeyboardConditions.LeftMouseButtonPressed;
MouseCameraController1.MoveCameraConditions = MouseAndKeyboardConditions.LeftMouseButtonPressed | MouseAndKeyboardConditions.ControlKey;
See Also