1

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?

rclark
  • 301
  • 3
  • 13
  • 1
    To put this older question to rest, these days it seems THREE.js always keeps camera.matrixWorldInverse up-to-date noted in three.js r.95 – René Jan 13 '19 at 13:05

1 Answers1

3

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

WestLangley
  • 102,557
  • 10
  • 276
  • 276
  • Thanks WestLangley, just thought it was weird because it was working in this example: http://threejs.org/examples/misc_controls_trackball.html – rclark Jun 30 '13 at 21:49
  • Hmmm. Something is fishy. Do you have `camera.matrixAutoUpdate = false`? Maybe you can track this issue down... – WestLangley Jun 30 '13 at 22:10