-
-
Notifications
You must be signed in to change notification settings - Fork 6
Usage
All joysticks are exposed to the built in Input Mappings system within Unreal Engine
This means you can bind to your joystick easily within the Editor itself
ℹ️ If your input doesn't show up:
You may need to close the Project Settings tab and reopen it!
The Joystick Plugin comes with a pre-built mapping remapping
This allows Developers to tell the Engine that a specific Axis mapping should read the values produced by the controller in a specific way
This is handy for Devices that don't map the values between 0 and 1 (or -1 and 1)
For example, on the Thrustmaster T300RS the Accelerator is mapped between 1 and 0 (1 being not pressed)
However, the Logitech wheel may map the Accelerator as 0 and 1 (0 being not pressed)
- In the Project Settings, there is a Plugins section (near the bottom) - there you'll see the Joystick Input category
- In the Joystick Input you'll see the Devices list that the plugin has detected
- Below that you'll see the Device Configurations section
- Under the Axis Properties we can add remappings to adjust how Unreal reads our inputs
The plugin has several delegates exposed in a few places to help Developers implement a Event Driven gameplay
-
JoystickSubsystemReady
This delegate is used to let a Developer know when the Joystick is ready to send events to the Engine
Before this Delegate is called, no inputs will be processed
-
JoystickPluggedIn
This fires off when a Joystick has been plugged in and is registered by the plugin as a valid device
-
JoystickUnplugged
This is fired off when a valid Joystick has been unplugged
Force Feedback Effects are exposed as UObjects to allow Developers to easily define Effects
The ideal way to control the data within these Effects is to extend upon the JoystickForceFeedbackEffectComponent
(or JoystickMultiForceFeedbackComponent
for scenarios where you have multiple effects being controlled by the one component)
These Components have pre-defined functions that handle the Spawning, Initialisation and Starting of your Effect(s)
Alternatively Effect objects are Blueprintable and have their own Tick - such that you can extend the Effect to control its own data
- Within your Content Browser, click Add/Import
- Then click Blueprint Class
- In the search bar, type
ForceFeedback
and choose your Effect type
- Name your Asset and Save
- From here you can override the Effect Data - as well as override some functions exposed to the Effect itself
ℹ️ If you're using a Force Feedback Component, this is already handled by the Component
Sometimes during Gameplay you may want to spawn an effect from an Event
You can achieve this within the Joystick Plugin by constructing the effect type with Auto Start
and Auto Init
enabled