Drawing Lines in XNA
One of the things I realized is very handy when prototyping or debugging is to draw a line on a specific location. Like drawing lines around collision boxes to see if your character is making a proper collision. For my games I’ve made a small LineBatch.
LineBatch is a static class, you only need to call LineBatch::Init(GraphicsDevice) somewhere on your code.
I’ve made a small unit test that you can download here. Try clicking the screen to set a start and end point.
Here’s a video showing the result: