1
vote
1answer
2k views

Raycasting Collision Detection

I need to check for collisions when firing a bullet, but I have a few questions first. My game is 2D and tile based, it also uses the XNA framework. From what I've read raycasting or continuous ...
8
votes
2answers
1k views

How can I test if a point lies between two parallel lines?

In the game I'm designing there is a blast that shoots out from an origin point towards the direction of the mouse. The width of this blast is always going to be the same. Along the bottom of the ...
6
votes
4answers
2k views

How do I find the intersection of two lines

I have a bounding box on my character, its position in the previous frame an the current frame. The bounding box is axis aligned. My character is running around inside a cave, I have a list of ...
8
votes
4answers
764 views

Moving objects colliding when using unalligned collision avoidance (steering)

I'm having trouble with unaligned collision avoidance for what I think is a rare case. I have set two objects to move towards each other but with a slight offset, so one of the objects is moving ...
4
votes
1answer
1k views

Points on lines where the two lines are the closest together

I'm trying to find the points on two lines where the two lines are the closest. I've implemented the following method (Points and Vectors are as you'd expect, and a Line consists of a Point on the ...