Class DrivenMovingPlatform
DrivenMovingPlatform is a simple implementation of the IMovingPlatform interface that is driven by some external mechanism such as a script or Animator component. It simply reads its position each frame. Because of this, it will always be one frame ahead of any contacting character due to interpolation. A moving platform is an environment object that will move a INeoCharacterController when it is in contact.
Inherited Members
Namespace: NeoFPS
Assembly: NeoFPS.dll
Syntax
public class DrivenMovingPlatform : MonoBehaviour, IMovingPlatform, IMonoBehaviour, IOriginShiftSubscriber
Properties
fixedPosition
The current fixed update position of the platform in world space (used for interpolation).
Declaration
public Vector3 fixedPosition { get; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
fixedRotation
The current fixed update rotation of the platform in world space (used for interpolation).
Declaration
public Quaternion fixedRotation { get; }
Property Value
| Type | Description |
|---|---|
| Quaternion |
previousPosition
The position of the platform in world space on the last fixed update frame (used for interpolation).
Declaration
public Vector3 previousPosition { get; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
previousRotation
The rotation of the platform in world space on the last fixed update frame (used for interpolation).
Declaration
public Quaternion previousRotation { get; }
Property Value
| Type | Description |
|---|---|
| Quaternion |
Methods
ApplyOffset(Vector3)
Declaration
public void ApplyOffset(Vector3 offset)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | offset |
Awake()
Declaration
protected void Awake()
FixedUpdate()
Declaration
protected void FixedUpdate()
OnDestroy()
Declaration
protected void OnDestroy()