Camera Controller
The Camera Controller has many options and can be a bit overwhelming at first. This page will walk you through every option and will help you decide what you need.
Authoring main settings
Main Camera
Ticking this will put a TPC_MainCamera component on the entity. A syncing system, will write the transform back to the defined MainCamera or Camera.main
Target
Reference the subscene GameObject at authoring stage or the entity at runtime that the camera should follow
Controller options
Basic settings
Min/Max Distance
The min/max distance the player can zoom in/out.
Desired Distance
The starting distance of TPC.
Collision Distance
Set the distance the camera should have from any wall when colliding.
Offset vector
Offset the camera pivot point. This is usually aligned so the camera will pivot around the head of a character.
Camera offset vector
Offset the camera in any axis without changing the pivot point. This can be utilized for mechanics like aiming.
Zoom Out Step Value
The distance how fast the player can zoom in/out manually.
Occluded Zoom In Speed
Define the lerping speed how fast the camera will zoom in when it is occluded. High values or 0 will have an instant change, lower values will gradually zoom in but based on the game it can end up in clipping through geometry.
Unoccluded Zoom Out Speed
Define the lerping speed how fast the camera will zoom out when it's not occluded. High values or 0 will have an instant change, lower values will gradually zoom out.
Camera Offset Change Speed
Define how fast the camera offset can change. Used for the "Over the shoulder" feature and defines how fast the camera will move when aiming or releasing.
Camera Offset Min Distance
The min distance the camera will have to the pivot point when the camera offset is occluded. For example, when aiming to the right and move against a wall.
Hide Skinned Mesh Renderers
Automatically turns off a targets skinned mesh renderer when the camera collider hits the player collider
Features
Occlusion Check
Automatically reposition the camera when the character is blocked by an obstacle.
Smart Pivot
Uses a pivot when the camera hits the ground and prevents moving the camera closer to the target when looking up.
Thickness Check
Thickness checking can be configured to ignore smaller obstacles like sticks, trees, etc... to not reposition or zoom in the camera.
Thickness check settings
Max Thickness
Adjusts the thickness check. The higher, the thicker the objects can be and there will be no occlusion check. Warning: Very high values could make Occlusion checking obsolete and as a result the followed target can be occluded.
Smart Pivot settings
Smart Pivot Only Ground
Smart pivot will only be activated on stable grounds, determined by target Up and maxFloorDot.
Max Floor Dot
Only hit results from maxFloorDot to 1 will be valid. [dot(groundHitNormal, targetUp)]
Static pivot rotation settings
Pivot Rotation Enabled Enable pivot rotation feature to rotate the camera in any direction without the camera moving or rotating around. Used in LockOn and Follow.
Smooth Pivot
When enabled the pivot will smoothly slerp to the new pivot angles.
Custom Pivot
Enable overriding the pivot with the public variable 'pivotAngles'.
Pivot Angles
Use to override pivot and is represented in Euler angles.
Smooth target mode
Smooth Target Mode
Enable to smooth out target following, to hide noisy position changes that should not be picked up by the camera immediately or to enable smooth transitions to other targets that are changed during runtime
Smooth Target Value
The speed at which the camera lerps to the actual target position for each axis.