- Home /
Vehicle automatically accelerates with any input on Logitech G29
Hi All,
I have been using Logitech G29 for developing purpose in Unity, which worked out well before. However, recently I have used it for some racing games (WRC and F1), where I switched the clutch and accelerator pedals inside both games. When I switched back to Unity, the simulator did not work properly anymore.
Many times right after I started the simulation, the vehicle doesn't move (with Unity standard assets, or with Edy's Vehicle Physics). Right after I made any input to the simulator, such as steering wheel, the vehicle starts to accelerate by itself. I can see from the log message that the vertical axis input stays at 1. The only way to change this is to press the CLUTCH pedal, which is very weird. The brake pedal and the accelerate pedal do not work at all.
I tried to modify the "Axis" in the input manager, which seemed not working as well. Does anyone have any insight on this?
Answer by blagwedge · Aug 15, 2020 at 04:49 PM
Hey there @wonderwall11,
I found the Input Debugger in the new InputSystem very useful for this, it can show you what values your G29 returns to Unity. I don't have a G29, i have something similar, where the steering wheel is represented by a virtual stick, and for some reason, the Y axis was set to be -1 unless i had the brake pedal pressed down.
I solved this by creating a 2D vector Input Action, then mapping stick left, stick right, then mapping up to the gas pedal, and down to the brake pedal. I then changed my code to read in the horizontal and vertical values from the Input Action. Think i normalized them too. Hope this helps.
Your answer
Follow this Question
Related Questions
Standard Assets Car Automatically Accelerates and Turns Left 0 Answers
Allow CrossPlatformInputManager to use a Custom VirtualInput extended Class [Unity5] 0 Answers
Standard assets CarWayPointBased: how to let the vehicle drive and stop? 2 Answers
How can I stop the standard car asset auto reversing with Logitech steering wheel 3 Answers
Standard Asset Car won't shift past 3rd gear yet coding is set to 5 gears. 1 Answer