Feel  5.1
The best way to improve your game's feel and make it extra juicy
MoreMountains.Tools.MMBillboard Class Reference

Add this class to an object (usually a sprite) and it'll face the camera at all times More...

Inheritance diagram for MoreMountains.Tools.MMBillboard:

Public Attributes

bool GrabMainCameraOnStart = true
 whether or not this object should automatically grab a camera on start More...
 
bool NestObject = true
 whether or not to nest this object below a parent container More...
 
Vector3 OffsetDirection = Vector3.back
 the Vector3 to offset the look at direction by More...
 
Vector3 Up = Vector3.up
 the Vector3 to consider as "world up" More...
 

Protected Member Functions

virtual void Awake ()
 On awake we grab a camera if needed, and nest our object More...
 
virtual void NestThisObject ()
 Nests this object below a parent container More...
 
virtual void GrabMainCamera ()
 Grabs the main camera. More...
 
virtual void Update ()
 On update, we change our parent container's rotation to face the camera More...
 

Protected Attributes

GameObject _parentContainer
 

Properties

virtual Camera MainCamera [get, set]
 the camera we're facing More...
 

Detailed Description

Add this class to an object (usually a sprite) and it'll face the camera at all times

Member Function Documentation

◆ Awake()

virtual void MoreMountains.Tools.MMBillboard.Awake ( )
protectedvirtual

On awake we grab a camera if needed, and nest our object

◆ GrabMainCamera()

virtual void MoreMountains.Tools.MMBillboard.GrabMainCamera ( )
protectedvirtual

Grabs the main camera.

◆ NestThisObject()

virtual void MoreMountains.Tools.MMBillboard.NestThisObject ( )
protectedvirtual

Nests this object below a parent container

◆ Update()

virtual void MoreMountains.Tools.MMBillboard.Update ( )
protectedvirtual

On update, we change our parent container's rotation to face the camera

Member Data Documentation

◆ _parentContainer

GameObject MoreMountains.Tools.MMBillboard._parentContainer
protected

◆ GrabMainCameraOnStart

bool MoreMountains.Tools.MMBillboard.GrabMainCameraOnStart = true

whether or not this object should automatically grab a camera on start

◆ NestObject

bool MoreMountains.Tools.MMBillboard.NestObject = true

whether or not to nest this object below a parent container

◆ OffsetDirection

Vector3 MoreMountains.Tools.MMBillboard.OffsetDirection = Vector3.back

the Vector3 to offset the look at direction by

◆ Up

Vector3 MoreMountains.Tools.MMBillboard.Up = Vector3.up

the Vector3 to consider as "world up"

Property Documentation

◆ MainCamera

virtual Camera MoreMountains.Tools.MMBillboard.MainCamera
getset

the camera we're facing


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