   collision triangle
  I have a rectangle i test to see  if it overlaps another rectangle in a collision game algorithm. It works fine.What I am confused about is to test if it collides with only half the rectangle which is a right angles triangle in a rectangle.this tests for 2 rectangles  but what do i do to test for 1 rectangle and triangle as explained above to overlap.  If pl.top < En.bottom Or pl.bottom > En.top Or pl.right < En.left Or pl.left > En.right Then  hitenemy(0)  Return False  'no collsion as player not near enemy   ElseIf pl.left <= En.right And pl.right >= En.right And pl.top >= En.bottom And pl.bottom <= En.bottom Then  'test top left corner of player in enemy  hitenemy(1)  Return True   ElseIf pl.left <= En.left And pl.right >= En.left And pl.top >= En.bottom And pl.bottom <= En.bottom Then  'test top right corner of player  in emeny  hitenemy(2)  Return True   ElseIf pl.left <= En.left And pl.right >= En.left And pl.top >= En.top And pl.bottom <= En.top Then  'test top bottom right corner of player in enemy  hitenemy(3)  Return True   ElseIf pl.left <= En.right And pl.right >= En.right And pl.top >= En.top And pl.bottom <= En.top Then  'test top bottom left corner of player in enemy  hitenemy(4)  Return True   ElseIf pl.left >= En.left And pl.right <= En.right And pl.top <= En.top And pl.top >= En.bottom Then  'test player 2 top points inside enemy   hitenemy(5)  Return True   ElseIf pl.left >= En.left And pl.right <= En.right And pl.bottom <= En.top And pl.top >= En.top Then  'test player 2 bottom points inside enemy   hitenemy(6)  Return True   End If   Return False   