Class ArcadeModule
Module providing arcade-style driving assists to enhance vehicle handling and fun factor. Contains multiple assist systems that can be tuned independently for different gameplay experiences.
This module includes:
- Steer Assist: Adds artificial steering torque independent of tire grip, helping vehicles turn more responsively
- Drift Assist: Maintains controlled drifts by preventing spin-outs and helping hold drift angles
These assists work by applying additional forces and torques to the vehicle's Rigidbody, supplementing the physical tire simulation to create more arcade-like handling characteristics. Perfect for arcade racing games, casual driving games, or adding fun handling to simulation games.
All assists can be individually tuned or disabled for different vehicle types or player preferences.
Inherited Members
Namespace: NWH.VehiclePhysics2.Modules.ArcadeModule
Assembly: NWH.VehiclePhysics2.dll
Syntax
[Serializable]
public class ArcadeModule : VehicleComponent
Fields
artificialSteerStrength
Multiplier for artificial steering torque applied directly to the vehicle's Rigidbody. This torque helps the vehicle turn regardless of tire grip conditions.
Range: 0-10 (typically 0-2)
- 0: Disabled, pure physics-based steering only
- 0.5: Subtle assistance for improved responsiveness
- 1.0: Moderate assistance, good for arcade-sim balance
- 2.0+: Strong assistance for full arcade feel
The actual torque applied is proportional to vehicle mass and speed. Only active when vehicle is fully grounded.
Declaration
[Tooltip("Torque that will be applied to the Rigidbody to try and reach the steering angle,\r\nirrelevant of the tire slip. Only active when vehicle is fully grounded.")]
public float artificialSteerStrength
Field Value
| Type | Description |
|---|---|
| float |
counterSteerReward
Assist reduction when counter-steering correctly. 1 = full player control.
Declaration
[Tooltip("Assist reduction when counter-steering. 1 = full player control.")]
public float counterSteerReward
Field Value
| Type | Description |
|---|---|
| float |
counterSteerStability
Bonus stability when counter-steering correctly.
Declaration
[Tooltip("Stability bonus when counter-steering.")]
public float counterSteerStability
Field Value
| Type | Description |
|---|---|
| float |
driftAngle
Current drift angle in degrees. Positive = right, negative = left.
Declaration
[NonSerialized]
public float driftAngle
Field Value
| Type | Description |
|---|---|
| float |
driftAssistStrength
Overall strength multiplier for the drift assist system. Controls how aggressively the system tries to maintain the target drift angle.
Range: 0-2
- 0: Disabled, no drift assistance
- 0.5: Light assistance, allows more natural drifts
- 1.0: Standard assistance, good balance
- 2.0: Strong assistance, very controlled drifts
Declaration
[Tooltip("Strength of drift assist.")]
public float driftAssistStrength
Field Value
| Type | Description |
|---|---|
| float |
isCounterSteering
True when player is counter-steering into the drift.
Declaration
[NonSerialized]
public bool isCounterSteering
Field Value
| Type | Description |
|---|---|
| bool |
maxDriftAssistForce
Maximum lateral force in Newtons applied to the rear axle for drift control. This force prevents the vehicle from spinning out when drifting.
Typical values:
- Light vehicles: 500-1000 N
- Standard cars: 800-1500 N
- Heavy vehicles: 1500-3000 N
Higher values provide stronger drift stabilization but may feel less natural.
Declaration
[Tooltip("Maximum force that will be applied to the rear axle to keep the vehicle at or below the target drift angle.")]
public float maxDriftAssistForce
Field Value
| Type | Description |
|---|---|
| float |
maxyawRate
Yaw rate threshold (deg/s) before spin-out damping activates.
Declaration
[Tooltip("Max yaw rate before damping kicks in.")]
public float maxyawRate
Field Value
| Type | Description |
|---|---|
| float |
spinOutPrevention
Angular velocity damping strength. Higher = harder to spin out.
Declaration
[Tooltip("Spin-out prevention strength. Higher = more forgiving.")]
public float spinOutPrevention
Field Value
| Type | Description |
|---|---|
| float |
steerAngleContribution
Additional drift angle in degrees added based on steering input. Allows the driver to dynamically adjust drift angle while drifting.
Range: 0-30 degrees
- 0: Fixed drift angle, no steering influence
- 10: Moderate steering influence (recommended)
- 20+: Large steering influence, very dynamic drifts
The actual contribution is multiplied by the current steering input (-1 to 1).
Declaration
[Tooltip("angle that will be added to targetdriftAngle based on the steering input.\r\nIf the vehicle is drifting and there is steering input, drift angle will increase.")]
public float steerAngleContribution
Field Value
| Type | Description |
|---|---|
| float |
targetdriftAngle
Target drift angle in degrees that the assist system tries to maintain. The system applies corrective forces when the actual drift angle exceeds this value.
Range: 15-60 degrees
- 15-25: Slight drift, grip-focused driving
- 30-45: Balanced drift angle (recommended)
- 50-60: Extreme drift angles for show
No assistance is applied below this angle, allowing natural grip driving.
Declaration
[Tooltip("angle that the vehicle will attempt to hold when drifting.\r\nForce is applied if the angle goes over this value. If the angle is below the drift angle, no force is applied.")]
public float targetdriftAngle
Field Value
| Type | Description |
|---|---|
| float |
throttleAngleContribution
Extra drift angle allowed when on throttle.
Declaration
[Tooltip("Additional drift angle when on throttle.")]
public float throttleAngleContribution
Field Value
| Type | Description |
|---|---|
| float |
yawRate
Current yaw rate in degrees/second.
Declaration
[NonSerialized]
public float yawRate
Field Value
| Type | Description |
|---|---|
| float |
Methods
VC_FixedUpdate(float)
Updates arcade assists based on vehicle state and player input. Applies artificial steering torque and drift assistance forces.
Declaration
public override void VC_FixedUpdate(float DeltaTime)
Parameters
| Type | Name | Description |
|---|---|---|
| float | DeltaTime | Fixed time step in seconds. |