5
\$\begingroup\$

I have a camera, and I have a plane. The plane has 4 corner points. I need to find out how to change the projection-matrix of the camera so that the projection-rays of the camera always hit the corners of the plane.

The camera and the Plane are supposed to be movable rotateable (if possible) The Plane is also supposed to be scaleable.

enter image description here

Usage:

I am making a Stereo-3D-Game with Eyetracking where my 2 Eye-Vectors hit the exact same paralax-plane.

That paralax-plane is defined. So we have the Corner-positions of the Plane.

\$\endgroup\$
  • \$\begingroup\$ What have you already tried and where have the problems begun? \$\endgroup\$ – Candid Moon _Max_ Aug 31 at 11:24
  • \$\begingroup\$ I think it's a good fit for math.stackexchange.com as well. But since you started bounty here, if it doesn't violate rules, you could start a similar question there but unrelated to Unity. And if you get a correct answer there - you could answer this question yourself with a more specifications related to gamedev and Unity, give a link to math.stackexchange answer which your answer would be based on. Or you could ask the person from math.stackexchange to answer this question here if they would like to have reputation on gamedev.stackexchange as well. \$\endgroup\$ – Candid Moon _Max_ Aug 31 at 11:43
  • \$\begingroup\$ mh... thanks - i think ill do it after this bounty expires \$\endgroup\$ – OC_RaizW Aug 31 at 13:45
  • \$\begingroup\$ Just a thought, you know your back plane points are defined in screenspace as (-1,-1, 1), (1, -1, 1), (1,1,1,), (-1, 1,1), if you invert your current projection matrix that would give you where the camera could be statically pointed to (defined by yourself as a static projection matrix) ,and the plane. Could you fashion World Matrix that then orientates world to the difference between your static projection and the parallax plane. Rather than move your camera, determine the difference between the camera backplane and your parallax plane? There should be no computational penalty. \$\endgroup\$ – ErnieDingo Sep 2 at 23:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.