Picking and Bounding Boxes

Got the next essential small step of the project in today, picking, that is selecting an object that exists within a 3D world from a mouse click in the 2D world. Found some really good resources for this including the Hazy Mind site again and a new one I discovered by accident by Charles Humphrey. I had a little trouble at first with working out how to calculate a bounding box, but yet again the XNA community came to my rescue. Thanks to Andy and his blog I now have a custom content pipeline that generates a bounding box for my mesh automatically.

Now that you can select a unit on the map the next step will be to add the ability to add properties and *gulp* custom scripts!

2 Responses to Picking and Bounding Boxes
  1. Charles Humphrey Reply

    Thanks for the link, can’t wait to see Tower Defense as a finished game :)

  2. mike.cann Reply

    no problem mate, you got a realy nice blog there. Heheh i cant wait till i got something up and running for people to play either :D

Leave a Reply

Your email address will not be published. Please enter your name, email and a comment.

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>