Othographic Projection in XTK

后端 未结 1 1524
醉酒成梦
醉酒成梦 2021-01-26 07:13

So I am using XTK to develop a app that will allow users to view multiple 3D meshes in one renderer. The problem is that it uses a perspective camera instead of a orthographic,

相关标签:
1条回答
  • 2021-01-26 07:57

    So from what I can see, there's no way to set a 3D camera to be in orthographic perspective without modifying the source code. However, it seems fairly straight forward to add that functionality. If you add the following in a function to camera3D.js, that should get the right result (I tested it on XTK Tutorial 00).

    this._perspective = X.matrix.makeOrtho(X.matrix.identity(), -100, 100, -100, 100, 1, 10000);
    

    It uses goog.vec.Mat4.makeOrtho

    0 讨论(0)
提交回复
热议问题