Next: , Previous: , Up: Motion   [Contents][Index]


12.18 Simple Motor

Component: SimpleMotor

This component is similar to the ConstantForce component, except it works on non-rigidbodies instead. To use, add to any object that you would like to move and input the global or local motion you would like. For example, you could add this and a ’Billboard’ component to an enemy, and set the Local Impetus’ Z value to the speed you wish the enemy to move. The enemy will then fly through the air towards the camera automatically.

Field of SimpleMotor: Vector3 localImpetus

How fast in local space?

Default value: Vector3.zero

Field of SimpleMotor: bool running

Should the object move by default?

Default value: true

Available Messages

Message on SimpleMotor: Reverse ()

Reverses the direction of movement locally and globally.

Message on SimpleMotor: StartMoving ()

Begins or resumes movement of the object

Message on SimpleMotor: StopMoving ()

Pauses movement of the object

Message on SimpleMotor: ToggleMovement ()

Pauses or resumes movement of the object as appropriate

Message on SimpleMotor: SetImpetusX (float)

Sets the speed at which this object should move on the global X axis

Argument: The new value for X-axis movement

Message on SimpleMotor: SetImpetusY (float)

Sets the speed at which this object should move on the global Y axis

Argument: The new value for Y-axis movement

Message on SimpleMotor: SetImpetusZ (float)

Sets the speed at which this object should move on the global Z axis

Argument: The new value for Z-axis movement

Message on SimpleMotor: SetLocalImpetusX (float)

Sets the speed at which this object should move on the local X axis

Argument: The new value for X-axis movement

Message on SimpleMotor: SetLocalImpetusY (float)

Sets the speed at which this object should move on the local Y axis

Argument: The new value for Y-axis movement

Message on SimpleMotor: SetLocalImpetusZ (float)

Sets the speed at which this object should move on the local Z axis

Argument: The new value for Z-axis movement

Field of SimpleMotor: Vector3 localImpetus

How fast in local space?

Default value: Vector3.zero

Field of SimpleMotor: bool running

Should the object move by default?

Default value: true

Available Messages

Message on SimpleMotor: Reverse ()

Reverses the direction of movement locally and globally.

Message on SimpleMotor: StartMoving ()

Begins or resumes movement of the object

Message on SimpleMotor: StopMoving ()

Pauses movement of the object

Message on SimpleMotor: ToggleMovement ()

Pauses or resumes movement of the object as appropriate

Message on SimpleMotor: SetImpetusX (float)

Sets the speed at which this object should move on the global X axis

Argument: The new value for X-axis movement

Message on SimpleMotor: SetImpetusY (float)

Sets the speed at which this object should move on the global Y axis

Argument: The new value for Y-axis movement

Message on SimpleMotor: SetImpetusZ (float)

Sets the speed at which this object should move on the global Z axis

Argument: The new value for Z-axis movement

Message on SimpleMotor: SetLocalImpetusX (float)

Sets the speed at which this object should move on the local X axis

Argument: The new value for X-axis movement

Message on SimpleMotor: SetLocalImpetusY (float)

Sets the speed at which this object should move on the local Y axis

Argument: The new value for Y-axis movement

Message on SimpleMotor: SetLocalImpetusZ (float)

Sets the speed at which this object should move on the local Z axis

Argument: The new value for Z-axis movement


Next: , Previous: , Up: Motion   [Contents][Index]