package org.meganekkovr;

import android.support.annotation.NonNull;

import org.joml.Quaternionf;

/**
 * CameraComponent updates its {@link Entity}'s rotation to head tracking rotation in every frame.
 * Any children of its entity are fixed on viewport.
 */
public class CameraComponent extends Component {

    @Override
    public void update(@NonNull FrameInput frame) {

        // Update entity rotation to match to head tracking.
        Entity entity = getEntity();
        Quaternionf q = entity.getApp().getCenterViewRotation();
        entity.setRotation(q);

        super.update(frame);
    }
}

@@ -67,38 +67,8 @@
 l;%0A%0A
-import org.joml.Quaternionf;%0A%0A
 /**%0A
@@ -449,32 +449,16 @@
     
- Quaternionf q =
  entity.
 getA
@@ -457,70 +457,63 @@
 ity.
-getApp().getCenterViewRotation();%0A        entity.setRotat
+setRotation(HeadTransform.getInstance().getQuatern
 ion(
-q
+)
 );%0A%0A

Replace deprecated method