Astra Unity 2.6.6
Astra Unity Plugin
Astra.Examples.CameraControllerBase Class Reference

Base component that other camera types like Maya or Unity extend from. Provides several common camera focus and movement functions as an example for working with a character editor. More...

Inheritance diagram for Astra.Examples.CameraControllerBase:

Public Member Functions

void Init ()
 
void Frame ()
 Focuses the camera on either all or selected targets.
 
void FrameAll ()
 Orients the camera to focus on all skinned mesh renderers in the scene.
 
void Select ()
 Sets the current target from mouse, useful for things like focusing on it.
 
void SetSelected (Bounds selected)
 Assigns the bounds for tracking More...
 
void ClearSelected ()
 Removes outlines from SMRs
 
void Zoom (bool horizontal=false)
 Handles zooming in and out using the mouse More...
 
void Orbit ()
 Handles rotating around an object from the mouse input
 
void Pan ()
 Handles panning against an object from the mouse input
 

Public Attributes

float panSpeed = 1f
 
float rotateSpeed = 2f
 
float zoomSpeed = 1f
 
float scrollSpeed = 1f
 

Protected Member Functions

Bounds GetSelected (bool clearSelected=false)
 Finds the object oriented under the mouse More...
 
void ScrollWheel ()
 

Protected Attributes

GameObject orbitTarget
 
Quaternion orbitTargetRot
 
bool isOrthographic = false
 
Camera cam
 
string panIconPath
 
string zoomIconPath
 
string orbitIconPath
 
Color outlineColor = Color.yellow
 

Detailed Description

Base component that other camera types like Maya or Unity extend from. Provides several common camera focus and movement functions as an example for working with a character editor.

Member Function Documentation

◆ GetSelected()

Bounds Astra.Examples.CameraControllerBase.GetSelected ( bool  clearSelected = false)
inlineprotected

Finds the object oriented under the mouse

Parameters
clearSelectedIf true removes outlines of the selected SMR
Returns
A bounds of the selected item (may be empty)

◆ SetSelected()

void Astra.Examples.CameraControllerBase.SetSelected ( Bounds  selected)
inline

Assigns the bounds for tracking

Parameters
selectedThe bounds currently selected

◆ Zoom()

void Astra.Examples.CameraControllerBase.Zoom ( bool  horizontal = false)
inline

Handles zooming in and out using the mouse

Parameters
horizontalIf true flips axis

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