Click or drag to resize
Ab4d.SharpEngine logo

ManualPointerCameraControllerMoveCameraConditions Property

Gets or sets conditions from PointerAndKeyboardConditions enum that must be met to move the camera. Default value is PointerAndKeyboardConditions.LeftPointerButtonPressed and PointerAndKeyboardConditions.ControlKey.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public PointerAndKeyboardConditions MoveCameraConditions { get; set; }

Property Value

PointerAndKeyboardConditions
Remarks

MoveCameraConditions gets or sets conditions from PointerAndKeyboardConditions enum that must be met to move the camera.

To specify which pointer or mouse button is used to move the camera set MoveCameraConditions to LeftPointerButtonPressed, RightPointerButtonPressed or MiddlePointerButtonPressed.

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

To disable the camera movement set MoveCameraConditions to Disabled.

Default value of MoveCameraConditions is PointerAndKeyboardConditions.LeftPointerButtonPressed and PointerAndKeyboardConditions.ControlKey.

To specify conditions to rotate the camera use RotateCameraConditions property. To specify conditions to start quick zooming the camera use QuickZoomConditions property.

Example

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

C#
PointerCameraController1.RotateCameraConditions = PointerAndKeyboardConditions.LeftPointerButtonPressed;
PointerCameraController1.MoveCameraConditions = PointerAndKeyboardConditions.LeftPointerButtonPressed | PointerAndKeyboardConditions.ControlKey;
See Also