Eye of the Nile Docs
Everything you need to know to get started!
Loading...
Searching...
No Matches
FacePlayer Class Reference

Detailed Description

This script constantly updates the X Flip of the SpriteRenderer of the object that this script is attached to, so the object constantly faces the player. If this script makes the object face the opposite direction that you want, change the object's SpriteRenderer's default X Flip value.

Documentation updated 4/14/2025

Author
Alexander Art

Protected Attributes

bool objectDefaulFlipX
 

Private Member Functions

void Awake ()
 
void Update ()
 

Private Attributes

SpriteRenderer spriteRenderer
 
GameObject player
 
float deadZone = 1f
 

Member Function Documentation

◆ Awake()

void FacePlayer.Awake ( )
private

◆ Update()

void FacePlayer.Update ( )
private

Member Data Documentation

◆ deadZone

float FacePlayer.deadZone = 1f
private

◆ objectDefaulFlipX

bool FacePlayer.objectDefaulFlipX
protected

◆ player

GameObject FacePlayer.player
private

◆ spriteRenderer

SpriteRenderer FacePlayer.spriteRenderer
private

The documentation for this class was generated from the following file: