|
-
Apr 24th, 2007, 09:56 AM
#1
Thread Starter
Frenzied Member
[XNA - 2D] Collision Detection
Hi,
I'm trying to get per pixel collision detection working in XNA, but I'm afraid that I'm stuck at the idea fase.
I pretty much have an idea on how to do collision detection on sprites that aren't transformed in any way(rotated, scaled), by first checking their bounding rectangle, and thereafter checking each pixels value.
My problem is trying to figure out how to check collision detection on objects that are being rotated, because the rotation happens during the rendering, which means for all I know the graphics processor could be the one calculating the rotation.
Is there any function in XNA that returns a rotated image? And if not, does anyone have an idea on how to approach this? Do I have to write something that rotates the sprite myself?
I've tried googling, and so far I've found some examples in which the rotation is handled by the actual application - I'm having a hard time figuring out how it works exactly though, and I'm holding on to the idea that something like it must be part of XNA.
Any help is greatly appreciated.
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
- Zack de la Rocha
Hear me roar.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|