Determine corners of a specific plane in the frustum

Posted by Takumi on Game Development See other posts from Game Development or by Takumi
Published on 2011-11-15T09:04:40Z Indexed on 2011/11/15 10:16 UTC
Read the original article Hit count: 265

Filed under:
|

I'm working on a game with a 2D view in a 3D world. It's a kind of shoot'em up. I've a spaceship at the center of the screen and i want that ennemies appear at the borders of my window. Now i don't know how to determine positions of the borders of the window.

For example, my camera is at (0,0,0) and looking forward (0,0,1). I set my spaceship at (0,0,50). I also know the near plane (1) and the far plane(1000). I think i'd have to find the 4 corners of the plane in the frustum whose z position is 50, and with these corner i can determine borders. But i don't know how to determine x and y.

© Game Development or respective owner

Related posts about camera

Related posts about frustum