1

I'm just trying to update the camera to tilt upwards or left-right in its reference frame. However, I'm having trouble (I'm new to three.js). I have been trying applyMatrix, and camera.matrix= etc. I would like a method that can rotate the camera by any quaternion, and I haven't found a tutorial that shows how to do this.

FWIW, right now I have camer.matrix.multiply(somematrix) where somematrix is generated by a quaternion. This doesn't seem to be working.

davik
  • 675
  • 5
  • 12
  • http://stackoverflow.com/questions/18470156/setting-the-camera-matrix-manually-in-threejs I found this question which says what not to do, but not really clear on what to do? some example code would be appreciated. – davik Aug 29 '15 at 04:01
  • check this-> http://stackoverflow.com/questions/18834178/three-js-rotate-camera-in-plane and http://stackoverflow.com/questions/8426822/rotate-camera-in-three-js-with-mouse – Anoop B.K Aug 29 '15 at 04:07
  • See http://stackoverflow.com/questions/32157515/threejs-x-rotation-behaving-unexpectedly/32158005#32158005. See `Object3D.js` for the source code if you want to understand the math. – WestLangley Aug 29 '15 at 04:14
  • ok I think I got what I wanted with rotateonaxis. How do I close this question? – davik Aug 29 '15 at 04:54

0 Answers0