UE4 4.15 Generic USB Offset axis

Hi,

If I understand RawInputSettings.h correctly, you’re supposed to be able to set an “Offset” config option, that doesn’t seem to work.

+AxisConfig=(AxisKeyName="GenericUSBController_Axis3",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=True,Offset=1.000))

Inverts the axis, but doesn’t offset it.

I think I saw what might become a bug in RawInputWindows.h, the FAnalogData constructor that takes arguments doesn’t propagate InOffset to Offset.
I can’t see that constructor being used anywhere though, so I guess that isn’t the cause of the issue here.

I need the Offset option since the Logitech g29 pedals goes from 1 in default to 0 in pressed down (-1 to 0 in inverted) and the steering wheel’s range is [0, 1] instead of [-1, 1]

Have I missed something or is it a bug/not implemented?

Best regards,

Hey danjo133-

Can you explain the behavior you’re seeing and/or the behavior you’re expecting? The default values of GenericUSBController Axis 3 in a new project are set to bInverted = true and Offset = 1.0. With the pedals reading from -1 to 0 (since it’s inverted), this offset sets the input range to 0 to 1 (-1 + 1 when not in use and ranging up to 0 + 1 depending on how depressed the pedal is). This provides the expected behavior of no movement when the pedal is released and forward movement when pedal is pressed.

If you still need to tweak the Offset locally, you can do this by opening the Project Settings and navigating to the Plugins->Raw Input section. Updating the Offset here will update your provide instant feedback for PIE as well as updating your .ini file.

Cheers

Hi ,

I didn’t see any default values in DefaultInput.ini when creating a new empty project.
Now I took a closer look at the TP_VehicleBP template DefaultInput and saw a new parameter I had not seen before.

[/Script/RawInput.RawInputSettings]
+DeviceConfigurations=(VendorID="0x046D",ProductID="0xC262",AxisProperties=((bEnabled=False),(Key=GenericUSBController_Axis1,Offset=-0.500000), ...

Setting parameters there works just fine after modifying the VendorID and ProductID to what is shown in dxdiag!
I was under the impression that you could set parameters in

+AxisConfig

Where I haven’t gotten the Offset parameter to affect anything.

Oh. Project Settings → Plugins → Raw Input was neat :slight_smile:

Thanks for your support!

Cheers,