我想将相机的音高限制在+/- 90度。我该怎么做。
public boolean mouseMoved(MouseEvent event) {
Quaternion.mul(rotation, new Quaternion((float) Math.toRadians(event.x / -1f), Vector4f.UP), rotation);
Quaternion.mul(rotation, new Quaternion((float) Math.toRadians(event.y / 1f), rotation.getRight(null)), temp);
updateMatrix();
return true;
}