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

Started by
3 comments, last by Nextgenneo 15 years, 5 months ago
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
Advertisement
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/
RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.
ah makes sense. problem is tho how do you find the edges of the frustum as its just defined by planes?
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.
awesome, implemented and working.

This topic is closed to new replies.

Advertisement