-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support gyroscope with DS4 emulation #14
Comments
What I have done so far is take the void TDualShockController::SetGyro(const float AX, const float AY, const float AZ)
{
FReport.Report.wGyroX = floor((AX * 360.0f) + 0.5f);
FReport.Report.wGyroY = floor((AY * 360.0f) + 0.5f);
FReport.Report.wGyroZ = floor((AZ * 360.0f) + 0.5f);
} The only software I have to test the emulated DS4 is Fortnite. I have never tried a real DS4 in the game because I don't have one. It's doing something, but I have no clue if it's working as expected! Here is the version to test: UsendMii-Gyro-Test.zip ViGEmBus v1.17.333 is required. |
ok, have tested this out on cemu and it is definitely registering input but it almost seems that the values that it is getting are subdued in a way like a full 180 only registers as a very tiny movement. please ask if you need any help, I do own a ps5 controller if that means anything. |
Any news on this? |
I tried it on Yuzu with TOTK with DS4 and the test build of UsendMii with vigembus 1.17.333 |
I can confirm what everyone else is saying about that test build: the gyro is very damped compared to the cube shown in the USendMii, and I also noticed some random drift.
Here you are converting the Wii U GamePad gyro values (I assume going from 0.0 to 1.0?) to degrees (0.0 to 360.0) void TDualShockController::SetGyro(const float AX, const float AY, const float AZ)
{
FReport.Report.wGyroX = floor((AX * 4000.0f) - 2000.0f);
FReport.Report.wGyroY = floor((AY * 4000.0f) - 2000.0f);
FReport.Report.wGyroZ = floor((AZ * 4000.0f) - 2000.0f);
} |
As thre are not much update here, and as the UsendMii code is not open, i wonder if it would be possible to make changes "in the over side". I mean change a little the ViGEm code and make a "special wiiU to DS4 version" that modifie wGyroX, wGyroY, and wGyroZDS4_inside the ViGEm REPORT_EX structure ? |
In UsendMii, add support for gyroscope with DualShock 4 emulation (ViGEm).
What we know from the
VPADStatus
structure:In ViGEm the
DS4_REPORT_EX
structure:From the README in https://github.com/jangxx/node-ViGEmClient:
This is all the information I have right now about the gyroscope on the WiiU GamePad and the DualShock 4!
The text was updated successfully, but these errors were encountered: