Inventory Engine v4.2
Loading...
Searching...
No Matches
MoreMountains.Tools.MMBillboard Class Reference

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

Inherits MonoBehaviour.

Public Attributes

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

Protected Member Functions

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

Protected Attributes

GameObject _parentContainer

Properties

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

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: