# Finding camera view intersection w/ the X-Z plane?

This topic is 3670 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, I am trying to find out the 4 points that intersect with the X-Z from a camera. Drew up a little diagram to explain: The red dots are the points I want to find on the x-z plane. The black dot is the position of the camera and the black lines are the way its looking. Any suggestions or links to how this is done?? I have access to all the necessary information such as the view, projection matrix and the camera position, camera target. Thanks

##### Share on other sites
You have the camera position, look-at target, and both vertical and horizontal FOV, right? So use trivial ray-plane intersection down the edges of the frustrum.

Intersection; http://local.wasp.uwa.edu.au/~pbourke/geometry/

##### Share on other sites
ah makes sense. problem is tho how do you find the edges of the frustum as its just defined by planes?

##### Share on other sites
You'll just to figure out the corners of your frustum. This is easy to do...this tutorial shows you how to do it. You can just calculate the near or far corners, then from those you can get 4 rays by doing corner - cameraPos. Then you just have to do ray-plane intersection with the plane Y = 0, and you'll get the 4 points of intersection.

##### Share on other sites
awesome, implemented and working.

1. 1
2. 2
3. 3
Rutin
23
4. 4
5. 5
khawk
14

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633653
• Total Posts
3013164
×