Class CruiseControlModuleWrapper
MonoBehaviour wrapper that attaches CruiseControlModule to a VehicleController GameObject. The module uses a PID controller for automatic speed control.
Inheritance
CruiseControlModuleWrapper
Namespace: NWH.VehiclePhysics2.Modules.CruiseControl
Assembly: NWH.VehiclePhysics2.dll
Syntax
[Serializable]
[DisallowMultipleComponent]
public class CruiseControlModuleWrapper : ModuleWrapper
Fields
module
The cruise control module instance that handles automatic speed maintenance.
Declaration
public CruiseControlModule module
Field Value
| Type | Description |
|---|---|
| CruiseControlModule |
Methods
GetModule()
Gets the cruise control module instance.
Declaration
public override VehicleComponent GetModule()
Returns
| Type | Description |
|---|---|
| VehicleComponent | The CruiseControlModule instance as a VehicleComponent. |
Overrides
SetModule(VehicleComponent)
Sets the cruise control module instance.
Declaration
public override void SetModule(VehicleComponent module)
Parameters
| Type | Name | Description |
|---|---|---|
| VehicleComponent | module | The VehicleComponent to set as the cruise control module. |