Click or drag to resize

TransformObjectViaLocalSpace_Example Class

Example of how to perform the various Transforms (position, rotation, scale) on an object via local space. As well as some examples of what to do for additive style movement
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          SimpleDemosTransformObjectViaLocalSpace_Example

Namespace:  SimpleDemos
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
public class TransformObjectViaLocalSpace_Example : MonoBehaviour

The TransformObjectViaLocalSpace_Example type exposes the following members.

Constructors
  NameDescription
Public methodTransformObjectViaLocalSpace_Example
Initializes a new instance of the TransformObjectViaLocalSpace_Example class
Top
Methods
  NameDescription
Private methodStart
Start is called before the first frame update
Private methodUpdate
Logic of our demo
Top
Fields
  NameDescription
Public fieldm_AdditiveMovementAmount
The amount we want to move every Update cycle
Public fieldm_AdditiveScaleAmount
The amount we want to increase our scale by every Update cycle
Public fieldm_Angle
The angle we want to rotate by.
Public fieldm_MoveToPosition
The position we want to move to
Public fieldm_MyCustomAxis
The custom axis you wish to perform a rotation on
Public fieldm_MyRotationAxis
My axis of rotation for my object
Public fieldm_ObjectToManipulate
Provides an easy way to access the object we want to perform transformations on.
Public fieldm_Reset
Bool triggering if we should reset the variables and location of the cube
Public fieldm_ScaleToAmount
The amount we want to scale our object by
Public fieldm_SendAdditiveTransform
Bool triggering if we are doing additive transforms, such as building off of our previous location instead of just moving to a new position
Public fieldm_SendTransform
Bool triggering if we should send a single transform or not. Will be set back to false after setting to true to prevent variables from being sent again
Top
See Also