Skip to main content

HandCameraViewfinderResizerSettings.HandCameraViewfinderResizer

A private class in Root.Township, Alta.ScreenshotCamera. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

Keeps the hand camera viewfinder within a set distance of the local player's head by pulling it closer each late update. Client only.

Constructors​

MemberWhat it is
HandCameraViewfinderResizer(Transform targetTransform, HandCameraViewfinderResizerSettings settings)Creates a HandCameraViewfinderResizerSettings.HandCameraViewfinderResizer from targetTransform and settings.

Fields​

5 private and internal fields
MemberWhat it is
private Vector3 localPositionThe viewfinder's original local position.
private Transform parentTransformThe viewfinder's parent, used to measure distance from the head.
private HandCameraViewfinderResizerSettings settingsSettings holding clampDistance.
private Transform targetTransformThe viewfinder transform being moved.
private IUnityUpdateMethod updateLate update registration.

Methods​

MemberWhat it is
void Disable()Stops the late update loop.
2 private and internal methods
MemberWhat it is
private void UpdateLoop()Late update that runs UpdateWithCameraPosition with the local player's head position.
private void UpdateWithCameraPosition(Vector3 cameraPosition)Leaves the viewfinder at its local position when close enough, otherwise places it clampDistance from the head towards the camera.

Used in​

Members of other types that take, return or hold a HandCameraViewfinderResizer: