I'm trying to make the camera project a cube into an image of a cube. I calculate the camera's internal and external parameters. I update the camera internal matrix by manually changing the projectionmatrix. the code is:
camera.projectionMatrix.elements[i]= value;
but for some reeason when i want to update its external parameters, by updating either camera.matrixWorld or camera.matrixWorldInverse nothing happens. i use this code:
camera.matrixWorldInverse.elements[i]= value;
camera.matrixWorld.elements[i]= value;
if i update both still nothing happens. what am I doing wrong? how can I update the camera's external parameters?
Your values may be getting overwritten. Try this:
camera.matrixAutoUpdate = false;
更改世界矩阵后尝试scene.updateMatrixWorld()
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.