headtrackr icon indicating copy to clipboard operation
headtrackr copied to clipboard

Suggestion: add setOffAxisProjection method to THREE.PerspectiveCamera

Open DBraun opened this issue 10 years ago • 0 comments

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.

DBraun avatar Sep 27 '14 03:09 DBraun