CameraBot  2.1.0
Camera Development Kit Enhancement
CF.CameraBot.CameraBot Class Reference

CF Camera for Unity3D - a spherical coordinates camera handler. More...

Inheritance diagram for CF.CameraBot.CameraBot:

Public Member Functions

void UpdatePosition (float keyHorizontal, float keyVertical, float mouseHorizontal, float mouseVertical, float mouseWheel)
 In order to control camera you need to giving the following values. More...
 
void SwitchCamera (string cameraLabel)
 Select Camera preset by giving name. More...
 
void SwitchCamera (int id)
 Select Camera preset by giving index. More...
 
void GetChaseTarget (out Transform targetReference, out Transform forwardReference)
 Gets current chase target. More...
 
void SetChaseTarget (Transform newTarget, Transform newForward=null)
 Sets chase target and it's forward reference. More...
 
void GetCamera (out Transform positionReference, out Transform rotationReference)
 Gets camera position & rotation transform reference. More...
 
void SetCamera (Transform positionReference, Transform rotationReference=null)
 Sets the camera transform position pivot point and rotation transform object. More...
 

Public Attributes

Transform ChaseTarget
 Target gameobject want to chase More...
 
Transform TargetForward
 Override chase target forward direction by this transform forward. More...
 
Transform ControlPosition
 Translate object to chase target's relative position. More...
 
Transform ControlRotation
 Rotate gameObject to facing chase target. More...
 
InputSetting InputSetting
 Input handler parameter. More...
 
AdvanceSetting AdvanceSetting
 Advance Setting More...
 
int Selected = 0
 Currect Selected handler for camera. More...
 
List< PresetPreset = new List<Preset>()
 A list for developer to setup the camera detail. More...
 

Protected Member Functions

void InitRequiredObject ()
 
void InitReference ()
 
void ResetToInitStage (int pt)
 
void InitCameraPosition ()
 
Preset GetPreset (int index)
 
Transform GetPresetForward (Preset preset)
 
Vector3 GetRelativePosition (Preset preset)
 
Vector3 GetOrbitLerpFramePosition (Preset preset, float delta)
 
Quaternion GetOrbitLerpFrameRotation (Preset preset, float delta)
 
void AppendAvoidObstaclePosition (Preset preset)
 

Detailed Description

CF Camera for Unity3D - a spherical coordinates camera handler.

CF Camera for Unity3D - a spherical coordinates camera handler.

http://www.clonefactor.com

Member Function Documentation

void CF.CameraBot.CameraBot.GetCamera ( out Transform  positionReference,
out Transform  rotationReference 
)

Gets camera position & rotation transform reference.

Parameters
positionReferenceThe position reference.
rotationReferenceThe rotation reference.
void CF.CameraBot.CameraBot.GetChaseTarget ( out Transform  targetReference,
out Transform  forwardReference 
)

Gets current chase target.

Parameters
targetReferenceThe target reference.
forwardReferenceThe forward reference.
void CF.CameraBot.CameraBot.SetCamera ( Transform  positionReference,
Transform  rotationReference = null 
)

Sets the camera transform position pivot point and rotation transform object.

Parameters
positionReferenceThe position reference.
rotationReferenceThe rotation reference.
void CF.CameraBot.CameraBot.SetChaseTarget ( Transform  newTarget,
Transform  newForward = null 
)

Sets chase target and it's forward reference.

Parameters
newTargetThe new target.
newForwardThe new forward reference, default is newTarget itself.
void CF.CameraBot.CameraBot.SwitchCamera ( string  cameraLabel)

Select Camera preset by giving name.

Parameters
cameraLabelthe camera name on preset list.
void CF.CameraBot.CameraBot.SwitchCamera ( int  id)

Select Camera preset by giving index.

Parameters
idthe camera index on the list.
void CF.CameraBot.CameraBot.UpdatePosition ( float  keyHorizontal,
float  keyVertical,
float  mouseHorizontal,
float  mouseVertical,
float  mouseWheel 
)

In order to control camera you need to giving the following values.

Parameters
keyHorizontalkeyboard horizontal value, rotate orbit yaw angle.
keyVerticalkeyboard vertical value, rotate orbit pitch angle.
mouseHorizontalmouse horizontal value, rotate orbit yaw angle.
mouseVerticalmouse vertical value, rotate orbit pitch angle.
mouseWheelmouse wheel value, for camera zooming usage.

Member Data Documentation

AdvanceSetting CF.CameraBot.CameraBot.AdvanceSetting

Advance Setting

Transform CF.CameraBot.CameraBot.ChaseTarget

Target gameobject want to chase

Transform CF.CameraBot.CameraBot.ControlPosition

Translate object to chase target's relative position.

Transform CF.CameraBot.CameraBot.ControlRotation

Rotate gameObject to facing chase target.

InputSetting CF.CameraBot.CameraBot.InputSetting

Input handler parameter.

List<Preset> CF.CameraBot.CameraBot.Preset = new List<Preset>()

A list for developer to setup the camera detail.

int CF.CameraBot.CameraBot.Selected = 0

Currect Selected handler for camera.

Assign and change this at run time can also affect SwitchCamera method.

SwitchCamera()

Transform CF.CameraBot.CameraBot.TargetForward

Override chase target forward direction by this transform forward.


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