SteeringWheelInputProvider
adds steering wheel (Logitech/Thrustmaster/etc.) support to NWH Vehicle Physics 2.
Besides retrieving input from the wheel it also manages force feedback (FFB).
Logitech SDK is required for SteeringWheelInputProvider
to work - check setup steps below. Despite the name, Logitech SDK also works with wheels from other manufacturers since it uses DirectInput as the backend.
This script requires two front wheels to function.
Setting up .asmdef for Logitech SDK is required for v1.6 and up.
LogitechSDK
is present in the NWH.VehiclePhysics2.SteeringWheelInput.asmdef file under the Assembly Definition References section. Example:LogitechSteeringWheel
from Logitech SDK ⇒ Script Sample to any object in the scene and press play. Make sure that there are no errors and that the axes and inputs are recognized in the GUI.LogitechSteeringWheel
. This script will not be needed any more (except for any future debugging if needed).NWH > Vehicle Physics 2 > OptionalPackages > Input > SteeringWheelInput > SteeringWheelInput.unityasset
by double clicking on it in the inspector.SteeringWheelInputProvider
to any object in the scene. Make sure that there is only one InputProvider
of type SteeringWheelInputProvider
present in the scene.Vehicle Source
as needed.ForceFeedbackSettings
script to that vehicle.