mirror of https://github.com/axmolengine/axmol.git
[Tizen] fix acceleration wrong coordinates.
This commit is contained in:
parent
1acfca45b2
commit
5cc906f798
|
@ -103,8 +103,8 @@ void Accelerometer::OnDataReceived(SensorType sensorType, SensorData& sensorData
|
||||||
AccelerationSensorData& data = static_cast<AccelerationSensorData&>(sensorData);
|
AccelerationSensorData& data = static_cast<AccelerationSensorData&>(sensorData);
|
||||||
AppLog("AccelerationSensorData x = %5.4f , y = %5.4f, z = %5.4f ", data.x,data.y,data.z);
|
AppLog("AccelerationSensorData x = %5.4f , y = %5.4f, z = %5.4f ", data.x,data.y,data.z);
|
||||||
|
|
||||||
_accelerationValue.x = -data.x;
|
_accelerationValue.x = data.y;
|
||||||
_accelerationValue.y = -data.y;
|
_accelerationValue.y = -data.x;
|
||||||
_accelerationValue.z = -data.z;
|
_accelerationValue.z = -data.z;
|
||||||
_accelerationValue.timestamp = data.timestamp;
|
_accelerationValue.timestamp = data.timestamp;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue