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

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -