XNA Creators Club Online
Page 1 of 1 (5 items)
Sort Posts: Previous Next

Use a primitive cube to draw a bounding box?

Last post 04/11/2009 23:50 by Matt Dent. 4 replies.
  • 04/11/2009 19:27

    Use a primitive cube to draw a bounding box?

    I was intrigued by the 3D Primitives sample, and its promises of being able to draw bounding boxes. The only problem I have is the actual drawing of the bounding boxes. How can I use the cube primitive to draw a bounding box that I give it?
  • 04/11/2009 20:00 In reply to

    Re: Use a primitive cube to draw a bounding box?

    I recommend checking out the XNA Wiki, they have some excellent code for doing that very thing.  I'm using it for debugging...
  • 04/11/2009 21:09 In reply to

    Re: Use a primitive cube to draw a bounding box?

    You control the size and position of the primitive by what world matrix you pass to GeometricPrimitive.Draw.
    XNA Framework Developer - blog - homepage
  • 04/11/2009 21:52 In reply to

    Re: Use a primitive cube to draw a bounding box?

    I use lines as on the WIKI link above. Found it impossible to get the alpha blendng right using 8 vertex solid cubes.
    Game hobbyist hell-bent on coding a diabolical Matrix
  • 04/11/2009 23:50 In reply to

    Re: Use a primitive cube to draw a bounding box?

    Thanks a lot guys, I think I got it to work.
Page 1 of 1 (5 items) Previous Next