I was wondering on how to make line and rectangle collision detection. lines have starting point x1, y1 and ending point x2, y2 and also of thickness of line width. the rect would be top, bottom, left, right.
intersects(x1, y1, x2, y2, w, rect r) { returns true if intersects else return false. } I was thinking of taking the edge lines of rectangle then test if the lines and rectangle's edge lines intersect but I don't know how to the test the collision detection between two segment lines not to mention that the line being tested has width. is there any better solution? or suggestion? or maybe there something in libraries of android that I don't know yet. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en