40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
@startuml
|
|
class CameraControl {
|
|
- inputProvider : BaseInputProvider
|
|
+ pivotPoint : Transform
|
|
+ obstacleLayer : LayerMask
|
|
+ panSpeed : float = 0.5f
|
|
+ rotateSpeed : float = 5.0f
|
|
+ zoomSpeed : float = 5.0f
|
|
+ minZoom : float = 2.0f
|
|
+ maxZoom : float = 50.0f
|
|
+ enableSmoothing : bool = true
|
|
+ smoothTime : float = 0.1f
|
|
- _targetPosition : Vector3
|
|
- _targetRotation : Quaternion
|
|
- _targetZoom : float
|
|
- _currentVelocity : Vector3
|
|
- _isPanning : bool
|
|
- _isOrbiting : bool
|
|
- _cursorScreenPos : Vector2
|
|
- _cam : Camera
|
|
+ isInputLocked : bool = false
|
|
- isInitialized : bool = false
|
|
- Start() : void
|
|
- OnEnable() : void
|
|
- OnDisable() : void
|
|
- LateUpdate() : void
|
|
- OnCursorMoved(screenPos:Vector2) : void
|
|
- OnPanStart(cursorScreenPos:Vector2) : void
|
|
- OnPanEnd() : void
|
|
- OnRotateStart() : void
|
|
- OnRotateEnd() : void
|
|
- OnCursorDelta(delta:Vector2) : void
|
|
- OnZoom(scrollValue:float) : void
|
|
- ApplyMovement() : void
|
|
+ SnapToDirection(direction:Vector3) : void
|
|
- OnDrawGizmos() : void
|
|
}
|
|
MonoBehaviour <|-- CameraControl
|
|
@enduml
|