             vec3.set p0, m4.m12, m4.m13, m4.m14
 
             mat4.copyArray m4, rightViewMatrix
+            # mat4.rotateX m4, m4, Math.PI/2
             mat4.mul m4, m4, sst_inverse
             mat4.invert m4, m4
             mat3.fromMat4 m3, m4
             quat.fromMat3 r1, m3
-            if @use_unpredict
+            if use_unpredict
                 quat.slerp r1, @right_orientation, r1, unpredict
             quat.copy @right_orientation, r1
             vec3.set p1, m4.m12, m4.m13, m4.m14

        # v.set_clear false, false
        v.rect = [0, 0, 0.5, 1]
        # right eye viewport
        camera = right_cam = @scene.active_camera.clone()
        camera.rotation_order = 'Q'
        mat4.identity camera.matrix_parent_inverse
        quat.identity camera.rotation

            behaviour.on_enter_vr? left_cam, right_cam
        {position, width, height, left, top} = @canvas.style
        @old_canvas_style = {position, width, height, left, top}
        if mirror_zoom and \
            @canvas.style.width == '100vw' and @canvas.style.height == '100vh'
                @set_mirror_zoom mirror_zoom
        # Daydream controller hack
        @gamepad_connected = false #gamepad_connected
        window.addEventListener 'gamepadconnected', =>
            @gamepad_connected = true

    set_mirror_zoom: (zoom) ->
        {renderWidth, renderHeight} = @HMD.getEyeParameters("left")
