I am an Unreal Engine C++ Developer and currently am exploring the possibilities of UE4 Physx Vehicle Plugin. It is charming already! But I couldn’t find a solution to disengage the engine clutch such that the engine rotate freely without any torque transmission to the gearbox and the wheels. I want to implement a manual gear box which requires a clutch pedal. I have tried to put the Clutch Strength to zero with following code:
PxVehicleClutchData ClutchSetup = ((PxVehicleDriveTank*)PVehicleDrive)->mDriveSimData.getClutchData(); ClutchSetup.mStrength = clutchInput; // clutchInput = 0 ((PxVehicleDriveTank*)PVehicleDrive)->mDriveSimData.setClutchData(ClutchSetup);
But it only minimizes the torque transfer and wheels still continue to rotate slowly. Am I missing something like an update to the vehicle setup after the above code or is there other property or function hiding somewhere which does the engage/disengaging of clutch?
For the time being, I set the current gear to 0 to let the engine rotate freely. But it is not an elegant solution because it is not analog (as compared to digital inputs) in the sense that it instantly disengage the wheels from engine, not like a true Clutch Pedal.
Any suggestion is highly appreciated.