Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thiagoretes/PUBGM_AntiRecoil
A simple anti-recoil software for Player Unknown's Battleground Mobile emulator for PC
https://github.com/thiagoretes/PUBGM_AntiRecoil
anti-recoil motion-tracking-game-opencv opencv orb pubg pubgmobile realtime-tracking
Last synced: 14 days ago
JSON representation
A simple anti-recoil software for Player Unknown's Battleground Mobile emulator for PC
- Host: GitHub
- URL: https://github.com/thiagoretes/PUBGM_AntiRecoil
- Owner: thiagoretes
- Created: 2018-07-08T02:26:14.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-08T04:35:38.000Z (over 6 years ago)
- Last Synced: 2024-07-03T06:34:32.949Z (4 months ago)
- Topics: anti-recoil, motion-tracking-game-opencv, opencv, orb, pubg, pubgmobile, realtime-tracking
- Language: Python
- Size: 1.95 KB
- Stars: 13
- Watchers: 4
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PUBG Mobile Anti-Recoil
This is a simple script written in python to auto-shoot + control recoil of weapons in pubg mobile using feature detection for calculating the translation of the screen, just like a camera stabilizer would do probably.
I made this for learning purposes, so don't expect it to run perfectly, it may be buggy sometimes.
# How it works
The algorithm is simple:
1. Wait for the middle button of mouse to be pressed.
1. Grab the central part of screen(for this I use mss, as it claims to be the fastest way to grab screen in python), I'll call this as OLD_IMG.
1. While middle button of mouse is pressed do.
1. Grab another image of the same part of screen. This I'll call as NEW_IMG.
1. Just call ORB using OLD_IMG and NEW_IMG as the parameters. It'll detect some high quality points in image for detecting it's translation. Returns the keypoints and their respective descriptors.
1. Using the descriptors of both images, use a brute force matcher to match them between the OLD_IMG and NEW_IMG.
1. Sort them according to their distance.
1. Use the best X matches to calculate the translation vector between imgs.
1. Use the translation vector(dx,dy) to send mouse input and correct the recoil.
##Note: It works using the mouse events of **WINDOWS** so, it won't run in linux.