Description
Changelog
Reviews (0)

Gamepad Emulator (ViGEm Client)

"Do you not have an XBox or Dual Shock controller? You get one free."

This addon wraps the famous nefarius/ViGEmBus driver in a node-like API.

Use cases:

  • Testing your game's controller support when you don't have an XBox or Sony controller.
  • Making up and replaying controller input sequences accurately (to polish the feeling of your combat system etc.).
  • Hijacking inputs of a controller at system level and forward to a virtual one (HidHide is recommended as a companion for this use case).
  • And more, you get the idea.

Disclaimer:

  • Not to be confused with "virtual joystick" and "virtual gamepad", which is typically an input widget that allows touchscreen players to interact with your game in a console-like manner.
  • This addon is for Windows only.
  • ViGEm is no longer maintained by its original author, but as a time-tested project it has served its users well. This addon only supports emulating controllers that ViGEm can, which are XBox 360 Controller and Dual Shock 4.

Installation

To install the addon:

  1. Make sure you have ViGEmBus driver installed (typically you'll need to reboot after installing it),
  2. Grab the latest godot-vigem.zip,
  3. Unzip to get a folder named addons, put it in your project's root directory,
  4. Open your project in Godot Editor, a line should have been printed: "Connected to ViGEm bus driver.", meaning everything's ready.

Usage

  1. Add a XBox360ControllerEmulator or DualShock4Emulator node into the scene tree to create a virtual controller device,
  2. Call its send_event method with an InputEventJoypadButton or InputEventJoypadMotion of your definition: emulator.send_event(my_event),
  3. Your virtual controller will send the event to your system, emulating a real controller connected to one of your USB ports,
  4. Of course that event will loop back into your game, because the virtual device ACTS LIKE A REAL ONE,
  5. Removing the node from scene tree frees the virtual controller device.

Changelog for version v1.0.0

No changelog provided for this version.

Reviews

Gamepad Emulator (ViGEm Client) has no reviews yet.

Login to write a review.