Fix map view roll #474

This commit is contained in:
Emux 2018-01-26 18:49:15 +02:00
parent 33241250ff
commit 05d0b2b116
No known key found for this signature in database
GPG Key ID: 89C6921D7AF2BDD0

View File

@ -252,15 +252,15 @@ public class ViewController extends Viewport {
private void updateMatrices() {
/* - view matrix:
* 0. apply yaw
* 1. apply pitch
* 2. apply roll */
* 1. apply roll
* 2. apply pitch */
mRotationMatrix.setRotation(mPos.bearing, 0, 0, 1);
mTmpMatrix.setRotation(mPos.tilt, 1, 0, 0);
mTmpMatrix.setRotation(mPos.roll, 0, 1, 0);
mRotationMatrix.multiplyLhs(mTmpMatrix);
mTmpMatrix.setRotation(mPos.roll, 0, 1, 0);
mTmpMatrix.setRotation(mPos.tilt, 1, 0, 0);
mRotationMatrix.multiplyLhs(mTmpMatrix);
mViewMatrix.copy(mRotationMatrix);