Tuesday 29 May 2007

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 comments:

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

    ReplyDelete
  2. 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

    ReplyDelete