Camera |
RotateAroundPointerPosition gets or sets a Boolean that specifies if TargetPositionCamera or FreeCamera is rotated around a 3D position that is "behind" current pointer position.
The 3D position behind the pointer position is calculated with calling the GetRotationCenterPositionFromPointerPosition(Vector2, Boolean) method that uses hit testing to return the 3D position. The result of GetRotationCenterPositionFromPointerPosition is set to the TargetPositionCamera.RotationCenterPosition or FreeCamera.RotationCenterPosition property before starting the rotation.
When there is no object "behind" the pointer, then a standard rotation with changing only Heading and Attitude properties is used. In case of TargetPositionCamera or FreeCamera this means that the scene is rotated around TargetPosition which is shown at the center of Viewport3D and not around the position where the pointer is.
To provide custom 3D position when camera rotation is started, you can create a new class that is derived from PointerCameraController and override the GetRotationCenterPositionFromPointerPosition method. This can be used for example to rotate around 3D position that lies on a horizontal plane that goes through (0, 0, 0).
IMPORTANT:
RotateAroundPointerPosition works only with TargetPositionCamera and FreeCamera cameras (other cameras do not have RotationCenterPosition property).
Default value is false.