Modify a Mouse to Add “Kickback” When You Fire a Gun In-Game

This simple modification will add "kickback" force feedback to any computer mouse that activates whenever you fire a gun in-game.

For better or for worse, guns are very common in video games. But the “feel” of those guns varies dramatically from one game to the next. In some games, shooting a handgun feels about as impactful as flinging a rubber band. Other, better games have guns that feel far more satisfying. They achieve that with a combination of the damage those guns do to enemies, the on-screen animations, the sound effects, and force feedback through the controller. But PC gamers who play with the majority of mice don’t get the benefit of that force feedback. That’s why ilge ipek used an Arduino and some solenoids to add “kickback” to his mouse when playing PUBG.

PlayerUnknown’s Battlegrounds, usually abbreviated to “PUBG,” is the video game largely responsible for popularizing the “battle royale” gameplay mode that has been successful in other games like Fortnite and Call of Duty: Warzone. In the game, one hundred players are dropped into a single map that shrinks over time. The players all kill each other until only one person is left. While you can kill other players using vehicles, grenades, and more, good ol’ fashioned guns are the most common weapons. Those guns feel pretty decent, but the kickback added by this modification should dramatically increase the satisfaction of shooting noobs.

That kickback is provided by the movement of four electromagnetic solenoids that all actuate simultaneously whenever the mouse is clicked. The solenoids are attached to the mouse by a simple 3D-printed bracket. The inertia from the weight of the solenoids actuating causes the mouse to jump back a tad, resulting in directional force feedback that synchronizes nicely with the gun firing in-game. Those solenoids are controlled by an Arduino Uno board through a simple relay module. They’re wired in parallel so only one relay is required. The relay provides 12V power, which comes from an external power supply. A Python script running on the gaming computer detects mouse clicks, and whenever it does it sends a command to the Arduino through the serial connection. The best part is that this will work with any computer mouse, so you can continue using the model you prefer. It will also work with any game — not just PUBG.

cameroncoward

Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism

Latest Articles