George Clingerman

      XNADevelopment.com
posts - 188, comments - 1509, trackbacks - 181

My Links

News



Twitter












Tag Cloud

Article Categories

Archives

Post Categories

. XNADevelopment.com .

XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

rotatedrectangle There's a new XNA sample I've posted on XNADevelopment.com that demonstrates a method of detecting collisions between 2D rotated rectangles. I'm hoping to someday build a tutorial around this (maybe if I get enough requests for one!) but for now I've just made the source code available. I commented the code fairly thoroughly and made some attempt to write the code as readable as possible. It may be with those efforts that the sample will work well enough for most people without an accompanying tutorial.

I hope it's useful! As always, I welcome any feedback anybody might have and I hope this is useful to the XNA community.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted on Saturday, January 09, 2010 10:00 AM |

Feedback

Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Id love this to be done thoroughly!
a tutorial would be perfect. Is it physics too though?
1/16/2010 2:04 PM | Martin Pugh
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Very good tutorial because so far everything thing I've seen on the subject has made it seam like its really hard to do but you make it simple. I'm just having one small problem, My sprites won't show up in the game in less i change your draw code from new rectangle(blahhh) to null. Any help on this? Also if i only have one rotating sprite do all my sprites that can collide
have to use this method?

Thankz a lot...


1/18/2010 10:45 PM | johhny waffle
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

This is a great tutorial!!!
1/21/2010 11:09 PM | BlazBlueAdmin
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

this wonderful event.
4/12/2010 10:22 PM | diyet
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

A tutorial would be very usefull.
Thanks for this method !
5/5/2010 5:02 AM | pronostics
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

how do i change it to make it so that i can rotate at any given origin?
6/10/2010 2:31 PM | tom nui
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Thankyou. :)
6/27/2010 1:43 AM | Lyttlefreak
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

@tom nui, re:origin
I managed to incorporate a given origin by creating a new constructor with a third vector 2 parameter that was used to set the Origin field. I then changed any negative Origin references to be subtracted from the width/height of the collissionRectangle. i.e
"-Origin.X" became "-(CollisionRectangle.Width - Origin.X)" and "-Origin.Y" became "-(CollisionRectangle.Height- Origin.Y)". Probably not the prettiest solution but it did SEEM to work for me (which suprised me a little as most of the sample code went over my head).

Thanks again for the sample code, I now have lasers (that work). :)
6/27/2010 10:51 AM | Lyttlefreak(newb)
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Very usefull tuto, it will help me, thanks a lot.
8/6/2010 2:26 AM | canalwin
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

This is a great ressource for everyone, thanks a lot.
8/6/2010 2:30 AM | parionsweb
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

nice article, i hope you will build the tutorial to learn a little more.
9/17/2010 9:35 AM | canalwin
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions



There is currently some useful information that regarding to health problem around this subject on the net and some are most definitely better than others. You have caught the detail here just right which makes for a refreshing change – thanks.
1/17/2011 4:02 AM | Internet Marketing
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Nice post collision detection i have always needed help on, thanks!
3/29/2011 1:37 PM | gift ideas
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Very nice tutorial can give functions to indiciduals.
5/1/2011 9:31 PM | Manuel Oquinn
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Very good tutorial because the post provided some thoughts.
5/5/2011 2:20 PM | zeka oyunları
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Ultrasound Technician is responsible and capable of managing ultrasound equipment and any other related apparatus.
5/6/2011 10:31 AM | Website ultrasound Technician
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Great blog, nice work!
5/6/2011 2:34 PM | erotic stories
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

indeed new sample on 2D is perfect in collisions .As these collisions have different effects
5/16/2011 3:05 PM | it services companies
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

here I found it. I am doing a project and this information is very useful me. If you are interested, but this is my duty to inform you that healthy is very important. So let take time to take care of your body. Click here to get free information on Healthy weight loss.
5/30/2011 3:34 PM | ipod cases
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but this articles is best.

Facebook Landing Page
7/10/2011 1:32 PM | maimi
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

This is a invaluable website and i also are finding reliable information below and that i actually value the attempts from the writer with this composition for revealing nice tips. Many thanks!
7/27/2011 12:56 AM | information on car insurance
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

I am happy when reading your blog with updated information! thanks alot and hope that you will post more site that are related to this site.
Foil Insulation
8/19/2011 7:24 AM | jasmeen
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Thanks for the info! interesting post
9/8/2011 10:06 AM | lina
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

keep it up. Thanks for the post!
9/8/2011 10:08 AM | fashionable swimsuits
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions



That is this kind of exceptional resource that you simply are supplying so you give it absent totally free of cost. I value viewing world wide web websites that understand the appeal of presenting a prime resource for no value. I truly cherished studying your submit. Thanks!

9/19/2011 7:54 PM | Ayurveda
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Good tutorial, thanks ! springkussen
9/29/2011 2:41 AM | Bradon Hops
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

really interesting.I really enjoyed reading it so that is why I will check your posts every day.Thank you so much for your effort.Logomatten

10/10/2011 2:24 AM | Logomatten
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

I read your post and I found it amazing .Your thought process is wonderful. The way you express yourself is awesome. Hey, your blog is great. I will bookmark it and I plan to visit regularly.
10/13/2011 5:23 AM | Nigerians
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Hi, im really interested in how your app work. In XDA we are talking about overclocking of MSM7201a , but i have no idea about how your program can be ported to android. Do you see it possible?

Thank you!
10/27/2011 10:51 AM | dragon ball z games
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

really interesting.I really enjoyed reading it so that is why I will check your posts every day.Thank you so much for your effort
11/2/2011 8:23 AM | Berufstest Berufswahltest
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

looking forward to the tutorial! 5554
11/12/2011 12:50 AM | netixpress
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Now Students can buy any kind of books according to their syllabus and for other stuff
11/12/2011 7:18 AM | Purchase books online
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Nice post collision detection i have always needed help on, thanks! Tips To Get Your Ex Back As Soon As Possible
11/19/2011 12:29 AM | What To Say To Get Your Ex back
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

haha, Thanks for the spoof! It’s funny because I feel like so many people don’t even know how bad a no follow tag can be. I feel like all it does is hurt websites as a whole.
11/21/2011 5:56 AM | yaz recall
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Great and very interesting post. Thanks.
11/30/2011 6:08 AM | Chinese Dresses For Children
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

I read your post and I found it amazing .Your thought process is wonderful. The way you express yourself is awesome. Hey, your blog is great. I will bookmark it and I plan to visit regularly for my Detektei Berlin
12/10/2011 12:53 PM | Detektei Berlin
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

This is my first time i visit here. I found so many interesting stuff in your site especially its discussion. From the tons of response on your articles, I think I am not the only one having all the enjoyment here. Keep up the good work. Thanks for sharing…
12/14/2011 1:17 AM | lexapro law firm
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

It`s awsome!! Thanks alot! It`s just like FUS RO DAH ))
12/20/2011 5:55 PM | CkEsc
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Our stretch limousine represents class, elegance and luxury. Whether you’re getting married, having a night out with the girls or any occasion. Our Stretch limousine is your best choice for Limo hire Melbourne . Our new car introductory offer is a free bottle of champagne with every booking plus you’ll get a fantastic hire rate. The longer you hire the cheaper it gets per hour.
12/30/2011 4:27 AM | Limo
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Great and very excellent post. Thanks.
1/23/2012 4:12 AM | mode für mollige
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Great technique! Having some trouble getting it working, though. Any chance of a tutorial? Thanks
1/24/2012 7:53 PM | Meneliki
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

A very nice post, thank you for this article as I learn something interesting
Logitech Wireless Mouse
1/25/2012 2:14 AM | Best Wireless Mouse
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Thanks Buddy for the post and allowing user comments on your post. Its great sign for the new visitors. Well done and keep up the good work. Regards top websites
2/1/2012 11:42 PM | Best All In One Computer
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

Great job on this.
Gravatar

# re: XNADevelopment.com - New sample on 2D Rotated Rectangle Collisions

I would say that this is the best site that I have never seen before. It is really informative to the people as it shows lot of hard work and research by the staff at this website. There is no other website that has so much information this site has. Danish Poker History
2/4/2012 6:08 AM | Danish Poker News
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: