Highroad Engine v1.3
|
A class used to make a camera orbit around a target More...
Public Types | |
enum | Modes { Mouse , Touch } |
the possible input modes for this camera More... | |
Public Member Functions | |
virtual void | Initialization () |
On init we store our positions and rotations More... | |
Public Attributes | |
Modes | Mode = Modes.Touch |
the selected input mode More... | |
Transform | Target |
the object to orbit around More... | |
Vector3 | TargetOffset |
the offset to apply while orbiting More... | |
float | DistanceToTarget = 5f |
the current distance to target More... | |
bool | RotationEnabled = true |
whether or not rotation is enabled More... | |
Vector2 | RotationSpeed = new Vector2(200f, 200f) |
the speed of the rotation More... | |
int | MinVerticalAngleLimit = -80 |
the minimum vertical angle limit More... | |
int | MaxVerticalAngleLimit = 80 |
the maximum vertical angle limit More... | |
bool | ZoomEnabled = true |
whether or not zoom is enabled More... | |
float | MinimumZoomDistance = 0.6f |
the minimum distance at which the user can zoom in More... | |
float | MaximumZoomDistance = 20 |
the max distance at which the user can zoom out More... | |
int | ZoomSpeed = 40 |
the speed of the zoom interpolation More... | |
float | ZoomDampening = 5f |
the dampening to apply to the zoom More... | |
float | MouseWheelSpeed = 10f |
the speed at which scrolling the mouse wheel will zoom More... | |
float | MaxMouseWheelClamp = 10f |
the max value at which to clamp the mouse wheel More... | |
float | StepThreshold = 1 |
the distance after which to trigger a step More... | |
UnityEvent | StepFeedback |
an event to trigger when a step is met More... | |
Protected Member Functions | |
virtual void | Start () |
On Start we initialize our orbital camera More... | |
virtual void | LateUpdate () |
On late update we rotate, zoom, detect steps and finally apply our movement More... | |
virtual void | Rotation () |
Rotates the camera around the object More... | |
virtual void | StepDetection () |
Detects steps More... | |
virtual void | Zoom () |
Zooms More... | |
virtual void | ApplyMovement () |
Moves the transform More... | |
Protected Attributes | |
float | _angleX = 0f |
float | _angleY = 0f |
float | _currentDistance |
float | _desiredDistance |
Quaternion | _currentRotation |
Quaternion | _desiredRotation |
Quaternion | _rotation |
Vector3 | _position |
float | _scrollWheelAmount = 0 |
float | _stepBuffer = 0f |
A class used to make a camera orbit around a target
|
protectedvirtual |
Moves the transform
|
virtual |
On init we store our positions and rotations
|
protectedvirtual |
On late update we rotate, zoom, detect steps and finally apply our movement
|
protectedvirtual |
Rotates the camera around the object
|
protectedvirtual |
On Start we initialize our orbital camera
|
protectedvirtual |
Detects steps
|
protectedvirtual |
Zooms
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
float MoreMountains.Tools.MMOrbitalCamera.DistanceToTarget = 5f |
the current distance to target
float MoreMountains.Tools.MMOrbitalCamera.MaximumZoomDistance = 20 |
the max distance at which the user can zoom out
float MoreMountains.Tools.MMOrbitalCamera.MaxMouseWheelClamp = 10f |
the max value at which to clamp the mouse wheel
int MoreMountains.Tools.MMOrbitalCamera.MaxVerticalAngleLimit = 80 |
the maximum vertical angle limit
float MoreMountains.Tools.MMOrbitalCamera.MinimumZoomDistance = 0.6f |
the minimum distance at which the user can zoom in
int MoreMountains.Tools.MMOrbitalCamera.MinVerticalAngleLimit = -80 |
the minimum vertical angle limit
Modes MoreMountains.Tools.MMOrbitalCamera.Mode = Modes.Touch |
the selected input mode
float MoreMountains.Tools.MMOrbitalCamera.MouseWheelSpeed = 10f |
the speed at which scrolling the mouse wheel will zoom
bool MoreMountains.Tools.MMOrbitalCamera.RotationEnabled = true |
whether or not rotation is enabled
Vector2 MoreMountains.Tools.MMOrbitalCamera.RotationSpeed = new Vector2(200f, 200f) |
the speed of the rotation
UnityEvent MoreMountains.Tools.MMOrbitalCamera.StepFeedback |
an event to trigger when a step is met
float MoreMountains.Tools.MMOrbitalCamera.StepThreshold = 1 |
the distance after which to trigger a step
Transform MoreMountains.Tools.MMOrbitalCamera.Target |
the object to orbit around
Vector3 MoreMountains.Tools.MMOrbitalCamera.TargetOffset |
the offset to apply while orbiting
float MoreMountains.Tools.MMOrbitalCamera.ZoomDampening = 5f |
the dampening to apply to the zoom
bool MoreMountains.Tools.MMOrbitalCamera.ZoomEnabled = true |
whether or not zoom is enabled
int MoreMountains.Tools.MMOrbitalCamera.ZoomSpeed = 40 |
the speed of the zoom interpolation