diff --git a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/Attachment/Nunchuk.cpp b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/Attachment/Nunchuk.cpp index c486c5cdb5..03e929799c 100644 --- a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/Attachment/Nunchuk.cpp +++ b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/Attachment/Nunchuk.cpp @@ -111,7 +111,7 @@ void Nunchuk::GetState(u8* const data, const bool focus) m_udpWrap->inst->getNunchuckAccel(x,y,z); accel->x=u8(x*(calib->one_g.x-calib->zero_g.x)+calib->zero_g.x); accel->y=u8(y*(calib->one_g.y-calib->zero_g.y)+calib->zero_g.y); - accel->z=u8(z*(calib->one_g.z-calib->zero_g.z)+calib->zero_g.z); + accel->z=u8(-z*(calib->one_g.z-calib->zero_g.z)+calib->zero_g.z); } } //End UDPNunchuck diff --git a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/UDPTLayer.h b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/UDPTLayer.h index 89212a3423..cd0db9c119 100644 --- a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/UDPTLayer.h +++ b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/UDPTLayer.h @@ -36,7 +36,7 @@ namespace UDPTLayer m->inst->getAccel(x,y,z); data->x=u8(x*(calib->one_g.x-calib->zero_g.x)+calib->zero_g.x); data->y=u8(y*(calib->one_g.y-calib->zero_g.y)+calib->zero_g.y); - data->z=u8(z*(calib->one_g.z-calib->zero_g.z)+calib->zero_g.z); + data->z=u8(-z*(calib->one_g.z-calib->zero_g.z)+calib->zero_g.z); } void GetIR( UDPWrapper * m, float * x, float * y, float * z)