Say I have view matrix and projection matrix in hand, how do I set camera position, rotation and scale using these matrices?
I read in the DOC that the view matrix of a camera is read only. And there is not an api to set entity matrix (getLocalMatrix only).
Anybody can help me? thanks very much
Projection and View matrices are constructed by the engine using camera properties, such as: field of view, near / far clip planes, node position, and other stuff.
Could you be setting them on camera instead of matrix?
Thank you for your help max.
I am doing as you suggested, but with a little trick.
I create a matrix4 in engine, and get the position and rotation from the matrix4 interface. That saved my day.
1 Like