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.
LogitechSteeringWheelfrom 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).
Setting up .asmdef for Logitech SDK is required for v1.6 and up.
LogitechSDKis present in the NWH.VehiclePhysics2.SteeringWheelInput.asmdef file under the Assembly Definition References section. Example:
NWH > Vehicle Physics 2 > Scripts > OptionalPackages > Input > SteeringWheelInput > SteeringWheelInput.unityassetby double clicking on it in the inspector.
SteeringWheelInputProviderto any object in the scene. Make sure that there is only one
SteeringWheelInputProviderpresent in the scene.
Vehicle Sourceas needed.
ForceFeedbackSettingsscript to that vehicle.