My Project
Loading...
Searching...
No Matches
CameraController.ThirdPersonCamera Class Reference
Inheritance diagram for CameraController.ThirdPersonCamera:
CameraController.Camera3D CameraController.BaseCamera

Protected Member Functions

override void UpdateFollowerPosition ()
override void UpdateCameraPosition ()
Protected Member Functions inherited from CameraController.Camera3D
virtual void OnEnable ()
override void UpdateCamera ()
 Update the camera and the target follower position.
Protected Member Functions inherited from CameraController.BaseCamera
virtual void Awake ()
virtual void Update ()
virtual void FixedUpdate ()
virtual void LateUpdate ()
void UpdateFollowerPosition ()
 Update the position of the target follower.
void UpdateCameraPosition ()
 Update the position of the camera.
float GetDeltaTime ()
 Get the deltatime based on the cuurent followmode.

Properties

CollisionDetection collisionDetection [get]
DampingParams collisionDamping [get]
Properties inherited from CameraController.Camera3D
Quaternion yaw [get]
 The rotation of the camera on the y axis.
Quaternion pitch [get]
 The rotation of the camera on the x axis.
float horizontalSensitivity [get, set]
float verticalSensitivity [get, set]

Private Member Functions

void Start ()
bool IsViewBlocked (Vector3 desiredCameraPos, out Vector3 hitPosition)
 Send a sphereCast to see if there is an object blocking the view.
Vector3 GetBlockedPosition (Vector3 position, Quaternion rotation, Vector3 currentPosition, Vector3 hitPosition)
 Get the position the camera should go at if there is an object blocking the view.
void GoToDesiredCameraPos (Vector3 currentCameraPos, Quaternion rotation, Vector3 desiredCameraPos)
 Move the camera to the desired position.
void MakeCameraLookAtTarget ()

Private Attributes

CameraCollisionParameters collisionParameters
readonly RaycastHit[] collisionHits = new RaycastHit[2]
Vector3 currentOffset
float dampVelocity

Additional Inherited Members

Public Member Functions inherited from CameraController.Camera3D
void SetRotationLimits (RotationLimits newYawLimits, RotationLimits newPitchLimits)
 Set the limits of the yaw and pitch rotation of the target follower.
Protected Attributes inherited from CameraController.Camera3D
Vector2 sensitivity
Protected Attributes inherited from CameraController.BaseCamera
Transform target
Transform targetFollower
Transform cameraTransform
Vector3 offset
FollowMode followMode
float followDamping
Vector3 followSmoothDampVelocity

Member Function Documentation

◆ GetBlockedPosition()

Vector3 CameraController.ThirdPersonCamera.GetBlockedPosition ( Vector3 position,
Quaternion rotation,
Vector3 currentPosition,
Vector3 hitPosition )
private

Get the position the camera should go at if there is an object blocking the view.

Parameters
positionthe position the camera follows
rotationthe rotation applied to the camera offset
currentPositionthe current position of the camera
hitPositionthe position at wich an object bloxking the view was detected

◆ GoToDesiredCameraPos()

void CameraController.ThirdPersonCamera.GoToDesiredCameraPos ( Vector3 currentCameraPos,
Quaternion rotation,
Vector3 desiredCameraPos )
private

Move the camera to the desired position.

Parameters
currentCameraPosthe current position of the camera
rotationthe rotation applied to the camera offset
desiredCameraPosthe position the camera should be at

◆ IsViewBlocked()

bool CameraController.ThirdPersonCamera.IsViewBlocked ( Vector3 desiredCameraPos,
out Vector3 hitPosition )
private

Send a sphereCast to see if there is an object blocking the view.

Parameters
desiredCameraPosthe position of the camera
hitPositionThe position where there is an object blocking the view.
Returns
true if an object blocking the view and give blockedAt the position at wich the view is blocked

The documentation for this class was generated from the following file:
  • CameraController/Script/Camera/3DCameras/ThirdPersonCamera.cs