Viewport.Unproject - Checking if a model intersects a large sprite

Posted by Fibericon on Game Development See other posts from Game Development or by Fibericon
Published on 2012-09-07T14:48:16Z Indexed on 2012/09/07 21:51 UTC
Read the original article Hit count: 233

Filed under:
|
|
|
|

Let's say I have a sprite, drawn like this:

spriteBatch.Draw(levelCannons[i].texture, levelCannons[i].position, null, alpha, levelCannons[i].rotation, Vector2.Zero, scale, SpriteEffects.None, 0);

Picture levelCannon as being a laser beam that goes across the entire screen. I need to see if my 3d model intersects with the screen space inhabited by the sprite. I managed to dig up Viewport.Unproject, but that seems to only be useful when dealing with a single point in 2d space, rather than an area. What can I do in my case?

© Game Development or respective owner

Related posts about XNA

Related posts about 2d