Is there any reason why a camera's matrixworldinverse won't update when using trackball controls?

StackOverflow https://stackoverflow.com/questions/17394811

  •  02-06-2022
  •  | 
  •  

문제

I'm viewing a scene using threejs and the trackball camera. I try to get the view matrix from the camera, but its matrixworldinverse isn't updating. I do call updateMatrixWorld in my render function. The matrixworld is updating, just not the inverse. Any ideas why?

도움이 되었습니까?

해결책

You need to do it yourself:

camera.matrixWorldInverse.getInverse( camera.matrixWorld );

Make sure camera.matrixWorld is updated first. Note that by default, it is automatically updated by the renderer.

three.js r.58

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top