Skip to main content

Class Vector3PIDController

PID controller for Vector3 quantities such as velocity error.

[Serializable]
public sealed class Vector3PIDController : PIDController<Vector3>

Inheritance​

Inherited Members​

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​

NameTypeDescription
errorVector3The current error value.
deltaTimefloatTime in seconds since the last update.

Returns​

Vector3 — The raw PID output before any external scaling or clamping.