mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-12-25 01:11:48 +01:00
Correct direction vectors for cemuhook motion input
This commit is contained in:
parent
6bcbda5ab2
commit
169bb29a54
@ -157,8 +157,11 @@ void Client::OnPadData(Response::PadData data) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
packet_sequence = data.packet_counter;
|
packet_sequence = data.packet_counter;
|
||||||
Math::Vec3f accel = Math::MakeVec<float>(data.accel.x, data.accel.y, data.accel.z);
|
// Due to differences between the 3ds and cemuhookudp motion directions, we need to invert
|
||||||
Math::Vec3f gyro = Math::MakeVec<float>(data.gyro.pitch, data.gyro.yaw, data.gyro.roll);
|
// accel.x and accel.z and also invert pitch and yaw. See
|
||||||
|
// https://github.com/citra-emu/citra/pull/4049 for more details on gyro/accel
|
||||||
|
Math::Vec3f accel = Math::MakeVec<float>(-data.accel.x, data.accel.y, -data.accel.z);
|
||||||
|
Math::Vec3f gyro = Math::MakeVec<float>(-data.gyro.pitch, -data.gyro.yaw, data.gyro.roll);
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> guard(status->update_mutex);
|
std::lock_guard<std::mutex> guard(status->update_mutex);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user