Utility functions to move transformes in the world.
Inherits MonoBehaviour.
|
virtual void | MoveForward (float z) |
| Moves the transform along the local Z-axis with the indicated speed.
|
|
virtual void | MoveSideward (float x) |
| Moves the transform along the local X-axis with the indicated speed.
|
|
virtual void | Rotate (float angularSpeed) |
| Rotates this transform with the indicated speed around the Y axis.
|
|
void | Dash (Vector3 targetPosition) |
| Quickly moves this transform to the targetPosition.
|
|
void | Teleport (Vector3 targetPosition) |
| Teleport this transform to the targetPosition.
|
|
void | Teleport () |
| Teleport this transform forward by 1 meter.
|
|
|
float | forwardSpeed = 1 |
|
float | sidewardSpeed = 1 |
|
float | rotationalSpeed = 60 |
|
◆ MoveForward()
virtual void Passer.Transportation.MoveForward |
( |
float |
z | ) |
|
|
virtual |
Moves the transform along the local Z-axis with the indicated speed.
Should be called every frame for continuous movement.
- Parameters
-
◆ MoveSideward()
virtual void Passer.Transportation.MoveSideward |
( |
float |
x | ) |
|
|
virtual |
Moves the transform along the local X-axis with the indicated speed.
Should be called every frame for continuous movement.
- Parameters
-
◆ Rotate()
virtual void Passer.Transportation.Rotate |
( |
float |
angularSpeed | ) |
|
|
virtual |
Rotates this transform with the indicated speed around the Y axis.
Should be called every frame for continuous rotation.
- Parameters
-
angularSpeed | The speed in degrees per second |
◆ Dash()
void Passer.Transportation.Dash |
( |
Vector3 |
targetPosition | ) |
|
Quickly moves this transform to the targetPosition.
This is a coroutine which will move the transform using DashCoroutine It does not need to be called every frame.
- Parameters
-
◆ Teleport()
void Passer.Transportation.Teleport |
( |
Vector3 |
targetPosition | ) |
|
Teleport this transform to the targetPosition.
- Parameters
-
targetPosition | The target position |
The documentation for this class was generated from the following file:
- d:/Unity/Humanoid4/Humanoid4_Pro/Assets/humanoidcontrol4_pro/Runtime/Tools/Scripts/Transportation.cs