Infinite Runner Engine v1.9
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.Tools.MMOrbitalCamera Class Reference

A class used to make a camera orbit around a target More...

Inheritance diagram for MoreMountains.Tools.MMOrbitalCamera:

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
 

Detailed Description

A class used to make a camera orbit around a target

Member Enumeration Documentation

◆ Modes

the possible input modes for this camera

Enumerator
Mouse 
Touch 

Member Function Documentation

◆ ApplyMovement()

virtual void MoreMountains.Tools.MMOrbitalCamera.ApplyMovement ( )
protectedvirtual

Moves the transform

◆ Initialization()

virtual void MoreMountains.Tools.MMOrbitalCamera.Initialization ( )
virtual

On init we store our positions and rotations

◆ LateUpdate()

virtual void MoreMountains.Tools.MMOrbitalCamera.LateUpdate ( )
protectedvirtual

On late update we rotate, zoom, detect steps and finally apply our movement

◆ Rotation()

virtual void MoreMountains.Tools.MMOrbitalCamera.Rotation ( )
protectedvirtual

Rotates the camera around the object

◆ Start()

virtual void MoreMountains.Tools.MMOrbitalCamera.Start ( )
protectedvirtual

On Start we initialize our orbital camera

◆ StepDetection()

virtual void MoreMountains.Tools.MMOrbitalCamera.StepDetection ( )
protectedvirtual

Detects steps

◆ Zoom()

virtual void MoreMountains.Tools.MMOrbitalCamera.Zoom ( )
protectedvirtual

Zooms

Member Data Documentation

◆ _angleX

float MoreMountains.Tools.MMOrbitalCamera._angleX = 0f
protected

◆ _angleY

float MoreMountains.Tools.MMOrbitalCamera._angleY = 0f
protected

◆ _currentDistance

float MoreMountains.Tools.MMOrbitalCamera._currentDistance
protected

◆ _currentRotation

Quaternion MoreMountains.Tools.MMOrbitalCamera._currentRotation
protected

◆ _desiredDistance

float MoreMountains.Tools.MMOrbitalCamera._desiredDistance
protected

◆ _desiredRotation

Quaternion MoreMountains.Tools.MMOrbitalCamera._desiredRotation
protected

◆ _position

Vector3 MoreMountains.Tools.MMOrbitalCamera._position
protected

◆ _rotation

Quaternion MoreMountains.Tools.MMOrbitalCamera._rotation
protected

◆ _scrollWheelAmount

float MoreMountains.Tools.MMOrbitalCamera._scrollWheelAmount = 0
protected

◆ _stepBuffer

float MoreMountains.Tools.MMOrbitalCamera._stepBuffer = 0f
protected

◆ DistanceToTarget

float MoreMountains.Tools.MMOrbitalCamera.DistanceToTarget = 5f

the current distance to target

◆ MaximumZoomDistance

float MoreMountains.Tools.MMOrbitalCamera.MaximumZoomDistance = 20

the max distance at which the user can zoom out

◆ MaxMouseWheelClamp

float MoreMountains.Tools.MMOrbitalCamera.MaxMouseWheelClamp = 10f

the max value at which to clamp the mouse wheel

◆ MaxVerticalAngleLimit

int MoreMountains.Tools.MMOrbitalCamera.MaxVerticalAngleLimit = 80

the maximum vertical angle limit

◆ MinimumZoomDistance

float MoreMountains.Tools.MMOrbitalCamera.MinimumZoomDistance = 0.6f

the minimum distance at which the user can zoom in

◆ MinVerticalAngleLimit

int MoreMountains.Tools.MMOrbitalCamera.MinVerticalAngleLimit = -80

the minimum vertical angle limit

◆ Mode

Modes MoreMountains.Tools.MMOrbitalCamera.Mode = Modes.Touch

the selected input mode

◆ MouseWheelSpeed

float MoreMountains.Tools.MMOrbitalCamera.MouseWheelSpeed = 10f

the speed at which scrolling the mouse wheel will zoom

◆ RotationEnabled

bool MoreMountains.Tools.MMOrbitalCamera.RotationEnabled = true

whether or not rotation is enabled

◆ RotationSpeed

Vector2 MoreMountains.Tools.MMOrbitalCamera.RotationSpeed = new Vector2(200f, 200f)

the speed of the rotation

◆ StepFeedback

UnityEvent MoreMountains.Tools.MMOrbitalCamera.StepFeedback

an event to trigger when a step is met

◆ StepThreshold

float MoreMountains.Tools.MMOrbitalCamera.StepThreshold = 1

the distance after which to trigger a step

◆ Target

Transform MoreMountains.Tools.MMOrbitalCamera.Target

the object to orbit around

◆ TargetOffset

Vector3 MoreMountains.Tools.MMOrbitalCamera.TargetOffset

the offset to apply while orbiting

◆ ZoomDampening

float MoreMountains.Tools.MMOrbitalCamera.ZoomDampening = 5f

the dampening to apply to the zoom

◆ ZoomEnabled

bool MoreMountains.Tools.MMOrbitalCamera.ZoomEnabled = true

whether or not zoom is enabled

◆ ZoomSpeed

int MoreMountains.Tools.MMOrbitalCamera.ZoomSpeed = 40

the speed of the zoom interpolation


The documentation for this class was generated from the following file: