ry = mmove->cur.output.x - mmove->prev.output.x;
ephysics_body_rotation_get(body, &quat_prev);
- ephysics_quaternion_euler_set(&quat_delta, -ry * 0.06, - rx * 0.04, 0);
+ ephysics_quaternion_euler_set(&quat_delta, -ry * 3.43, - rx * 2.29, 0);
ephysics_quaternion_multiply(&quat_prev, &quat_delta, &quat);
ephysics_body_rotation_set(body, &quat);
}
if (nx) *nx = bt_quat.getAxis().getX();
if (ny) *ny = bt_quat.getAxis().getY();
if (nz) *nz = bt_quat.getAxis().getZ();
- if (a) *a = bt_quat.getAngle();
+ if (a) *a = bt_quat.getAngle() * RAD_TO_DEG;
}
EAPI void
}
axis = btVector3(nx, ny, nz);
- bt_quat = btQuaternion(axis, a);
+ bt_quat = btQuaternion(axis, a / RAD_TO_DEG);
_ephysics_quaternion_update(quat, &bt_quat);
}
}
bt_quat = btQuaternion();
- bt_quat.setEuler(yaw, pitch, roll);
+ bt_quat.setEuler(yaw / RAD_TO_DEG, pitch / RAD_TO_DEG, roll / RAD_TO_DEG);
_ephysics_quaternion_update(quat, &bt_quat);
}
bt_quat1 = btQuaternion(quat1->x, quat1->y, quat1->z, quat1->w);
bt_quat2 = btQuaternion(quat2->x, quat2->y, quat2->z, quat2->w);
- return bt_quat1.angle(bt_quat2);
+ return bt_quat1.angle(bt_quat2) * RAD_TO_DEG;
}
EAPI double