morriq Posted March 2, 2014 Share Posted March 2, 2014 Hello, Im asking you about help with border collision.Take a look on video http://screencast.com/t/9eK0K4wY Each element has size 42x42. And when I move my player in neighbourhood of some item then Phaser detect collision. I dont have any idea how can I solve that. Link to comment Share on other sites More sharing options...
morriq Posted March 2, 2014 Author Share Posted March 2, 2014 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 | 0And 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 More sharing options...
Recommended Posts