First, I rotate the rigid body 45 degrees around the y-axis

,

and then I rotate it 90 degrees on the x-axis

.

But I found that the rigid body didn't rotate along the X axis the second time

Code: Select all

```
btQuaternion quaternion = btQuaternion(yaw * RADIANS_PER_DEGREE, pich * RADIANS_PER_DEGREE, roll* RADIANS_PER_DEGREE);
trans.setRotation(quaternion);
body->setCenterOfMassTransform(trans);
```

Code: Select all

```
case Qt::Key_Z:
pich += 0.2f;
update();
break;
case Qt::Key_C:
roll -= 0.25f;
pich -= 0.2f;
update();
break;
```