Formerly known as "JmeGamepad" and "Superior-Extended-Engine" or "SEE".
Step 1. Add it in your root build.gradle at the end of repositories :
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency :
dependencies {
implementation 'com.github.Scrappers-glitch:Superior-Extended-Engine:1.x.x'
}
-
Constraining the game pad stick using a scale factor to the coordinates calculated from the similarity of parallel triangles
:
Code : https://github.com/Scrappers-glitch/Superior-Extended-Engine/blob/27c6dbb65e07eb2b3096b0dd07af575cc43c54f0/SuperiorPlugin/src/main/java/com/scrappers/superiorExtendedEngine/gamePad/GameStickView.java#L335
https://www.instructables.com/A-Simple-Android-UI-Joystick/
Linear Interpolation : https://www.mathsisfun.com/data/scatter-xy-plots.html -
Converting vector/rectangular coordinates (vector2d) to polar coordinates (angles) :
=> Used byDrivingWheel
Code : https://github.com/Scrappers-glitch/Superior-Extended-Engine/blob/27c6dbb65e07eb2b3096b0dd07af575cc43c54f0/SuperiorPlugin/src/main/java/com/scrappers/superiorExtendedEngine/vehicles/DrivingWheelView.java#L213
Trigonometry.pdf
Arc of trig functions : https://www.mathsisfun.com/algebra/trig-inverse-sin-cos-tan.html
Java atan2 docs : https://developer.android.com/reference/java/lang/Math#atan2(double,%20double) -
Using the game rotation vector software sensor (Geomagnetic sensor + Gyroscope) :
=> Used byGameDrivingMatrix
Code : https://github.com/Scrappers-glitch/Superior-Extended-Engine/blob/27c6dbb65e07eb2b3096b0dd07af575cc43c54f0/SuperiorPlugin/src/main/java/com/scrappers/superiorExtendedEngine/gamePad/GameStickView.java#L231
https://developer.android.com/guide/topics/sensors/sensors_position#java