|
@@ -325,6 +325,7 @@ static const float ACCEL_RANGE = 1;
|
|
|
|
|
|
void OSIPhone::update_accelerometer(float p_x, float p_y, float p_z) {
|
|
void OSIPhone::update_accelerometer(float p_x, float p_y, float p_z) {
|
|
|
|
|
|
|
|
+ ///@TODO I've made the Z negative like the original accelerometer code, this probably needs more work
|
|
input->set_accelerometer(Vector3(p_x / (float)ACCEL_RANGE, p_y / (float)ACCEL_RANGE, -p_z / (float)ACCEL_RANGE));
|
|
input->set_accelerometer(Vector3(p_x / (float)ACCEL_RANGE, p_y / (float)ACCEL_RANGE, -p_z / (float)ACCEL_RANGE));
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -365,11 +366,13 @@ void OSIPhone::update_accelerometer(float p_x, float p_y, float p_z) {
|
|
};
|
|
};
|
|
|
|
|
|
void OSIPhone::update_magnetometer(float p_x, float p_y, float p_z) {
|
|
void OSIPhone::update_magnetometer(float p_x, float p_y, float p_z) {
|
|
- input->set_magnetometer(Vector3(p_x, p_y, p_z));
|
|
|
|
|
|
+ ///@TODO I've made the Z negative like the original accelerometer code, this probably needs more work
|
|
|
|
+ input->set_magnetometer(Vector3(p_x, p_y, -p_z));
|
|
};
|
|
};
|
|
|
|
|
|
void OSIPhone::update_gyroscope(float p_x, float p_y, float p_z) {
|
|
void OSIPhone::update_gyroscope(float p_x, float p_y, float p_z) {
|
|
- input->set_gyroscope(Vector3(p_x, p_y, p_z));
|
|
|
|
|
|
+ ///@TODO I've made the Z negative like the original accelerometer code, this probably needs more work
|
|
|
|
+ input->set_gyroscope(Vector3(p_x, p_y, -p_z));
|
|
};
|
|
};
|
|
|
|
|
|
void OSIPhone::delete_main_loop() {
|
|
void OSIPhone::delete_main_loop() {
|