CollisionDetection icon indicating copy to clipboard operation
CollisionDetection copied to clipboard

Collision for parallel line to line

Open getdbjs opened this issue 4 years ago • 2 comments

I noticed that the collision is not detected between two parallel lines

getdbjs avatar Apr 15 '20 09:04 getdbjs

Since the parallel never intersects, because the slope of each is infinity or zero, the other question is when are perpendicular, when the angular coefficient of one of them is infinity.

Yes, and the formula is hard to understand

Lin-Rolover avatar Apr 20 '20 10:04 Lin-Rolover

@getdbjs – nope, you're right. I assumed that was a really unlikely case (since the lines would have to have the exact same start/end points for that to be the case which, with floats, is not going to happen very often) but can def add it.

@Lin-Rolover – thanks for clarifying. Would parallel and perpendicular be useful to add? (I suppose perpendicular is really just one kind of collision.)

jeffThompson avatar Apr 20 '20 17:04 jeffThompson