CameraBot
2.1.0
Camera Development Kit Enhancement
|
CF Camera for Unity3D - a spherical coordinates camera handler. More...
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< Preset > | Preset = 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) |
CF Camera for Unity3D - a spherical coordinates camera handler.
CF Camera for Unity3D - a spherical coordinates camera handler.
http://www.clonefactor.com
void CF.CameraBot.CameraBot.GetCamera | ( | out Transform | positionReference, |
out Transform | rotationReference | ||
) |
Gets camera position & rotation transform reference.
positionReference | The position reference. |
rotationReference | The rotation reference. |
void CF.CameraBot.CameraBot.GetChaseTarget | ( | out Transform | targetReference, |
out Transform | forwardReference | ||
) |
Gets current chase target.
targetReference | The target reference. |
forwardReference | The forward reference. |
void CF.CameraBot.CameraBot.SetCamera | ( | Transform | positionReference, |
Transform | rotationReference = null |
||
) |
Sets the camera transform position pivot point and rotation transform object.
positionReference | The position reference. |
rotationReference | The rotation reference. |
void CF.CameraBot.CameraBot.SetChaseTarget | ( | Transform | newTarget, |
Transform | newForward = null |
||
) |
Sets chase target and it's forward reference.
newTarget | The new target. |
newForward | The new forward reference, default is newTarget itself. |
void CF.CameraBot.CameraBot.SwitchCamera | ( | string | cameraLabel | ) |
Select Camera preset by giving name.
cameraLabel | the camera name on preset list. |
void CF.CameraBot.CameraBot.SwitchCamera | ( | int | id | ) |
Select Camera preset by giving index.
id | the 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.
keyHorizontal | keyboard horizontal value, rotate orbit yaw angle. |
keyVertical | keyboard vertical value, rotate orbit pitch angle. |
mouseHorizontal | mouse horizontal value, rotate orbit yaw angle. |
mouseVertical | mouse vertical value, rotate orbit pitch angle. |
mouseWheel | mouse wheel value, for camera zooming usage. |
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.
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.
Transform CF.CameraBot.CameraBot.TargetForward |
Override chase target forward direction by this transform forward.