Class ArcadeModuleWrapper
MonoBehaviour wrapper for the Arcade module.
Namespace: NWH.VehiclePhysics2.Modules.ArcadeModule
Assembly: NWH.VehiclePhysics2.dll
Syntax
[Serializable]
public class ArcadeModuleWrapper : ModuleWrapper
Remarks
Enables the ArcadeModule to be attached as a component to a VehicleController GameObject. The wrapper handles Unity's MonoBehaviour lifecycle and serialization while delegating the actual arcade assist logic to the contained module.
The Arcade module provides arcade-style driving assists that enhance vehicle handling, including artificial steering torque and drift stabilization. These assists supplement the physical tire simulation to create more responsive, fun handling for arcade racing games.
Add this component through: - Unity Editor: Add Component > NWH > Vehicle Physics 2 > Modules > Arcade Module - Script: gameObject.AddComponent<ArcadeModuleWrapper>()
Access the module field at runtime to tune assist parameters dynamically or query the current drift angle for scoring systems.
Fields
module
The ArcadeModule instance managed by this wrapper.
Declaration
public ArcadeModule module
Field Value
| Type | Description |
|---|---|
| ArcadeModule |
Remarks
Access this field to configure arcade handling at runtime: - Adjust artificial steer strength for responsiveness - Tune drift assist parameters for controlled drifting - Read drift angle for gameplay systems (scoring, UI) - Enable/disable individual assists for different modes
Example: Reduce drift assist strength when switching from arcade to simulation mode, or increase steer assist for easier difficulty settings.
Methods
GetModule()
Returns the contained ArcadeModule as a VehicleComponent.
Declaration
public override VehicleComponent GetModule()
Returns
| Type | Description |
|---|---|
| VehicleComponent | The ArcadeModule instance cast to VehicleComponent. |
Overrides
SetModule(VehicleComponent)
Sets the contained module from a VehicleComponent reference.
Declaration
public override void SetModule(VehicleComponent module)
Parameters
| Type | Name | Description |
|---|---|---|
| VehicleComponent | module | The VehicleComponent to set, must be an ArcadeModule instance. |