Corgi Engine  v8.8
MoreMountains.CorgiEngine.BackgroundTree Class Reference

Add this script to a tree to make it dance slowly over time More...

Inheritance diagram for MoreMountains.CorgiEngine.BackgroundTree:
MoreMountains.CorgiEngine.CorgiMonoBehaviour

Public Attributes

float scaleSpeed = 0.5f
 The speed (in seconds) at which a new target scale is determined. Bigger scaleSpeed means slower movement. More...
 
float scaleDistance = 0.01f
 The maximum distance between the transform and the new target scale. More...
 
float rotationSpeed = 1f
 The rotation speed (in seconds). Bigger rotation speed means faster movement. More...
 
float rotationAmplitude = 3f
 The rotation amplitude (in degrees). More...
 

Protected Member Functions

virtual void Start ()
 Initialize the targets More...
 
virtual void Update ()
 Every frame, we make the object dance More...
 
virtual Vector3 WiggleScale ()
 Makes the scale of the object wiggle More...
 
virtual Quaternion WiggleRotate ()
 Makes the rotation of the object wiggle More...
 

Protected Attributes

Vector3 _scaleTarget
 
Quaternion _rotationTarget
 
float _accumulator = 0.0f
 

Detailed Description

Add this script to a tree to make it dance slowly over time

Member Function Documentation

◆ Start()

virtual void MoreMountains.CorgiEngine.BackgroundTree.Start ( )
protectedvirtual

Initialize the targets

◆ Update()

virtual void MoreMountains.CorgiEngine.BackgroundTree.Update ( )
protectedvirtual

Every frame, we make the object dance

◆ WiggleRotate()

virtual Quaternion MoreMountains.CorgiEngine.BackgroundTree.WiggleRotate ( )
protectedvirtual

Makes the rotation of the object wiggle

Returns
The object's new rotation.

◆ WiggleScale()

virtual Vector3 MoreMountains.CorgiEngine.BackgroundTree.WiggleScale ( )
protectedvirtual

Makes the scale of the object wiggle

Returns
The object's new scale.

Member Data Documentation

◆ _accumulator

float MoreMountains.CorgiEngine.BackgroundTree._accumulator = 0.0f
protected

◆ _rotationTarget

Quaternion MoreMountains.CorgiEngine.BackgroundTree._rotationTarget
protected

◆ _scaleTarget

Vector3 MoreMountains.CorgiEngine.BackgroundTree._scaleTarget
protected

◆ rotationAmplitude

float MoreMountains.CorgiEngine.BackgroundTree.rotationAmplitude = 3f

The rotation amplitude (in degrees).

◆ rotationSpeed

float MoreMountains.CorgiEngine.BackgroundTree.rotationSpeed = 1f

The rotation speed (in seconds). Bigger rotation speed means faster movement.

◆ scaleDistance

float MoreMountains.CorgiEngine.BackgroundTree.scaleDistance = 0.01f

The maximum distance between the transform and the new target scale.

◆ scaleSpeed

float MoreMountains.CorgiEngine.BackgroundTree.scaleSpeed = 0.5f

The speed (in seconds) at which a new target scale is determined. Bigger scaleSpeed means slower movement.


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