Click or drag to resize

PanZoomRotateCam Class

Provides a robust gesture-oriented Pan/Zoom/Rotate functionality for a camera. Supports both orthographic and perspective modes.
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          Kit.BehavioursPanZoomRotateCam

Namespace:  Kit.Behaviours
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0
Syntax
C#
public class PanZoomRotateCam : MonoBehaviour
Request Example View Source

The PanZoomRotateCam type exposes the following members.

Methods
  NameDescription
Public methodRefresh
Reset values.
Top
Fields
  NameDescription
Public fieldPan
Whether to allow panning.
Public fieldPanSpeed
Panning speed.
Public fieldPanZoomFactor
Order of magnitude zoom level affects panning speed.
Public fieldRotate
Whether to allow rotation.
Public fieldRotateSpeed
The rotation speed.
Public fieldSmoothing

Smoothing to apply while Lerp-ing.

Applies to position, rotation and orthographicSize.

Public fieldView

Area/bounds to focus on, be it a Transform, Renderer or Collider.

Will be origin if not provided.

Public fieldZoom
Whether to allow zooming.
Public fieldZoomMax
Maximum orthographicSize if camera is orthographic, camera position in forward axis otherwise.
Public fieldZoomMin
Minimum orthographicSize if camera is orthographic, camera position in forward axis otherwise.
Public fieldZoomSpeed
Zooming speed.
Top
Extension Methods
  NameDescription
Public Extension MethodDestroy
Destroy the object.
(Defined by UnityObjectExtensions.)
Public Extension MethodDisable
Set the enabled property to .
(Defined by BehaviourExtensions.)
Public Extension MethodEnable
Set the enabled property to .
(Defined by BehaviourExtensions.)
Public Extension MethodGetBounds

Returns the bounds of the Component.

(Defined by ComponentExtensions.)
Public Extension MethodIsPrefab
Returns whether the Component is a part of a prefab.
(Defined by ComponentExtensions.)
Top
See Also