[edit] i cant uplaod the rar file 
Okay, so i have everything “done” I have that in quotes, because I’m still testing and figuring things out. I derived the functionality from the test program, so, if you have issues, let me know, so i can fix them…or implement your fix. The code that I used can be found here: (itsthe Logitech game software download)
http://www.logitech.com/en-us/support/g27-racing-wheel?osid=14&bit=64
once you have things installed, goto this dir:
C:\Program Files\Logitech\Gaming Software
and extract Logitech_SDK_For_PC_1.00.002.zip
The c++ code is in the zip, as well as a few test programs.
So, as I said, I used the test program to figure out how to make this lib. Heres how its used:
-
Add the 32 and 64 bit versions of the lib to your project directory. I have mine at …\carTest\Source\LogitechSteeringWheel
When unpacked, there should be 2 folders, one called “Libraries”, and one called “Includes”
-
To add the .dll and.lib to your c++ project, all you have to do is edit the build.cs file for your game, so it can find the libs you just copy/pasted
For example, if your game is called carTest (like mine is, lol) then you will edit carTest.Build.cs. It should be located at …\carTest\Source\carTest
Edit your carTest.Build.cs file should look something like this
using UnrealBuildTool;
public class carTest : ModuleRules
{
public carTest(TargetInfo Target)
{
PublicDependencyModuleNames.AddRange(new string] { "Core", "CoreUObject", "Engine", "InputCore" });
PrivateDependencyModuleNames.AddRange(new string] { "Core", "CoreUObject", "Engine", "InputCore" });
LoadLib(Target);
}
public void LoadLib(TargetInfo Target)
{
string LibraryPath = "C:/myGames/carTest/Source/LogitechSteeringWheel/Libraries/";
string IncludePath = "C:/myGames/carTest/Source/LogitechSteeringWheel/Includes/";
if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
{
string PlatformString = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64/" : "Win32/";
LibraryPath += PlatformString;
PublicLibraryPaths.Add(LibraryPath);
PublicIncludePaths.Add(IncludePath);
PublicAdditionalLibraries.Add(LibraryPath + "LogitechSteeringWheel.lib");
}
}
}
I’m not sure if i need both PublicDependencyModuleNames and PrivateDependencyModuleNames, but it works…I’ll experiment with it later.
Also, i noticed that the libs themselves dont need a cs.build file since they are already built. I guess if you were working on the dll/lib in tandem with the game, then build.cs would be needed. (someone please verify) My build.cs for the Logitech stuff is identical to the one i have for my game build.cs
2b) The build.cs file acts like project properties of visual studios. So, you are setting the directories of your libs and includes and what not. However, visual studio itself has no clue about the unreal build process, so when using code from the lib, it will underline all the code it doesn’t recognize. If this annoys you, you can include the include folder in project-> properties → configuration properties → VC++ Directories and fill out the "Include directories field. This should give visual studio a clue on whats going on and stop its complaining.
- in your code, use it like this:
#include "carTest.h"
#include "carTestPawn.h"
#include "carTestWheelFront.h"
#include "carTestWheelRear.h"
//add the header file
#include "LogitechSteeringWheel.h"
AcarTestPawn::AcarTestPawn(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
//init the steering wheel in the constructor or some early running method
SteeringWheel::initSteeringWheel();
//change the properties of the wheel with this call. I'm not sure if it works right at the moment...still testing and figuring out what does what
//I'm not sure what these mean, besides the wheelRange (i named degreeOfTurn for the params)
//SteeringWheel::setWheelProperties(bool enableForce, int overallGain, int springGain,int damperGain, bool combinePedals, int degreeOfTurn )
//other constructor code
...
}
//add a tick method if theres not one already, this is to poll the wheel every frame, and use its inputs
void AcarTestPawn::TickActor(float DeltaSeconds, ELevelTick TickType, FActorTickFunction& ThisTickFunction)
{
SteeringWheel::onUpdate();
SteeringWheel::getPedalInput();
//add the values of brake and gas pedal to get overall result
MoveForward(SteeringWheel::getThrottleValue() - SteeringWheel::getBrakeValue());
//without the negative value, the car would turn the wrong way, lol
MoveRight(-SteeringWheel::getSteeringValue());
}
//since ue4 has its own garbage collector and dont use destructors, make sure that we call BeginDestroy() to clean up the wheel
void AcarTestPawn::BeginDestroy()
{
SteeringWheel::destroySteeringWheel();
Super::BeginDestroy();
}
- make sure you take the proper dll and place it next the game exe in …\carTest\Binaries\Win64 (or whereever your game exe llives…I dont know how to make this automatic yet.
And with that, you should have control of your g27 and a slew of other steering wheels and control pads. For some joysticks, I had to guess how to implement them since I dont have them to see how they give values.
In the future, I’ll make the code blueprint friendly. However, for now, I’m more concerned on making sure everything works as intended.