Javascript Three.js point camera at fixed coordinate -


in javascript three.js, given coordinates of camera , coordinates of point (x, y, z), how rotate camera directly @ point?

you can make camera "look at" world-space point using lookat() method, so:

var point = new three.vector3( x, y, z );  camera.lookat( point ); 

note: method limited, in not work correctly if camera child of rotated or translated parent object. however, if camera has no parent, or if camera child of scene directly, method work expected.

three.js r.71


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - IIFE: var vs this - is there any difference? -

r - Grow a ffdf data frame on disk gradually -