# How to set the camera projectionmatrix so that it's 4 rays always exactly hit the corners of a defined plane?

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.

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.

• What have you already tried and where have the problems begun? – Candid Moon _Max_ Aug 31 '19 at 11:24
• 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. – Candid Moon _Max_ Aug 31 '19 at 11:43
• mh... thanks - i think ill do it after this bounty expires – OC_RaizW Aug 31 '19 at 13:45
• 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. – ErnieDingo Sep 2 '19 at 23:48
• @OC_RaizW I hope this helps: gamedev.stackexchange.com/a/178411/106129. – silviubogan Jan 16 at 10:59