Class Vector3PIDController
PID controller for Vector3 quantities such as velocity error.
[Serializable]
public sealed class Vector3PIDController : PIDController<Vector3>
Inheritance
Inherited Members
- PIDController<Vector3>.Coefficients
- PIDController<Vector3>.Reset()
- PIDController<Vector3>.GetOutput(Vector3, float)
Remarks
Applies independent PID correction on each axis of a three-dimensional error signal. Primarily used to bring an actor's velocity vector smoothly toward a desired direction without abrupt direction changes that would appear unrealistic in the driving simulation.
Methods
ComputeOutput(Vector3, float)
Performs the type-specific PID computation: calculates the proportional, integral, and derivative contributions and combines them according to the tuning coefficients.
protected override Vector3 ComputeOutput(Vector3 error, float deltaTime)
Parameters
| Name | Type | Description |
|---|---|---|
error | Vector3 | The current error value. |
deltaTime | float | Time in seconds since the last update. |
Returns
Vector3 — The raw PID output before any external scaling or clamping.