Skip to content
JaydenMaalouf edited this page Aug 29, 2022 · 5 revisions

Inputs

Binding Inputs

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!

Remapping Input Ranges

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
    image

Delegates

The plugin has several delegates exposed in a few places to help Developers implement a Event Driven gameplay

Subsystem Delegates

  • 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
    image

  • JoystickUnplugged
    This is fired off when a valid Joystick has been unplugged
    image

Force Feedback

Introduction

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

Create Force Feedback Effect

  1. Within your Content Browser, click Add/Import
  2. Then click Blueprint Class
  3. In the search bar, type ForceFeedback and choose your Effect type
  4. Name your Asset and Save
  5. From here you can override the Effect Data - as well as override some functions exposed to the Effect itself

Spawn Force Feedback Effect

ℹ️ 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 image