#Im trying to make a game with three.js and im a bit confused on how the camera rotation works.

2 messages · Page 1 of 1 (latest)

upper creek
#

I usually just use OrbitControls...
it has a ".target" point that is the point the camera will always look at... then you only have to worry about where you want to position the camera, and the looking is automatic.
It's easier than trying to figure out angles and all that noise.

IF you need to position the camera relative to a target object you can do this in your animate loop:

targetObject.localToWorld(camera.position.set( 0 ,1, -2))

that combined with orbitcontrols.. will give you a camera that is locked on to another object and will rotate with it...

#

r u trying to build a first person style camera?