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;
|
||||
}
|
||||
packet_sequence = data.packet_counter;
|
||||
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);
|
||||
// Due to differences between the 3ds and cemuhookudp motion directions, we need to invert
|
||||
// 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);
|
||||
|
||||
|
|
Reference in New Issue