headtrackr
headtrackr copied to clipboard
Suggestion: add setOffAxisProjection method to THREE.PerspectiveCamera
I imagine THREE.PerspectiveCamera could have a function like setOffAxisProjection(x, y, z, screenWidthPixels, screenHeightPixels)
x, y, and z refer to the viewer's position in centimeters relative to the center of the screen
From controllers.js it looks like all you need are wh, and ww. These are pixel measurements, right? That's my guess based off THREE.PerspectiveCamera.setViewOffset
The code that currently refers to fixedPosition could just inspect camera.position. If this seems like a bad idea, then fixedPosition could also be passed as an argument to setOffAxisProjection.
For a related issue, please take a look at this StackOverflow question.