Skip to main content

LocalPlayerHeadRenderer

A class in Root.Township, Alta.ScreenshotCamera.

Turns the local player's head renderers on while a hand camera renders, so selfies show your head, then restores them. Client only.

Constructors​

MemberWhat it is
LocalPlayerHeadRenderer()Creates a LocalPlayerHeadRenderer with default values.

Fields​

3 private and internal fields
MemberWhat it is
private bool cacheFirstPersonWhether the dummy was in first person before the render.
private PlayerCharacter characterThe registered player character.
private CharacterDummy characterDummyThe character's dummy, whose clothes hold the head renderers.

Methods​

MemberWhat it is
void Register(PlayerCharacter character)Starts handling for a player character and hooks the hand camera render events.
void Release()Unhooks the render and destroy events.
3 private and internal methods
MemberWhat it is
private void DestroyRelease(NetworkEntity entity, bool isUnload)Calls Release when the character's entity is destroyed.
private void OnPostRender(HandCamera handCamera, HandCameraEvent cameraEvent)Hides the head renderers again if the player was in first person.
private void OnPreCull(HandCamera handCamera, HandCameraEvent cameraEvent)Remembers first person state and turns the head renderers on before the camera renders.

Used in​

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