Jump to content

Border collision


morriq
 Share

Recommended Posts

Ok. After all day of trying everything I did it.

 

I had to make modification in library. 

If someone is interesting in solution:

 

intersects method (around 39908 line)

Above 

result = !(....

I added:

      a.right = a.right | 0      b.right = b.right | 0      b.left = b.left | 0      a.left = a.left | 0      a.bottom = a.bottom | 0      b.bottom = b.bottom | 0      b.top = b.top | 0      a.top = a.top | 0

And after i changed definition of result to:

result = !(a.right <= b.left || a.bottom <= b.top || a.left >= b.right || a.top >= b.bottom);

 

@rich, what you think about this solution?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...