背景:vksession 不同 的 track 跟踪能力,一个使用body 一个使用marker
表现:不同场景获得的VKCamera. viewMatrix VKCamera.getProjectionMatrix 不一样,看起来跟踪body的场景相机投影矩阵和视图矩阵每次都是一样的。
出现问题:在2d marker 场景 加载的glft模型贴图的左右是正确的, 在body场景下加载的模型左右相反了
相关打印矩阵打印如下:
跟踪类型为:marker
viewMatrix-marker :视图矩阵0.9950073957443237,0.05283389613032341,0.08466929197311401,0,-0.09812961518764496,0.36329400539398193,0.9264923334121704,0,0.018190350383520126,-0.9301753044128418,0.3666647970676422,0,-0.37284374237060547,-0.8171287178993225,-1.5291353464126587,1
projectionMatrix-marker 投影矩阵 3.021430492401123,0,0,0,0,1.5276896953582764,0,0,0,0,-1.0000019073486328,-1,0,0,-0.002000001957640052,0
跟踪类型为:body
viewMatrix-body:视图矩阵 1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1
projectionMatrix-body:投影矩阵 1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1
glft模型显示截图:marker的为正确✅,body的左右相反了 ❌
2D body算法不涉及到投影和view矩阵,marker为3D算法才会更新投影和视图矩阵