Vote count:
0
If anyone knows of any good open source libraries or engines, I would consider that an answer.
My question is essentially, how can I efficiently detect collision between image layers and generated shapes? I write in Java, Python and C. I am willing to use C+ also.
I need a fast and comprehensive method to detect collision between rotatable image layers and generated shapes.
So far I have just been dividing images into a series of circles that contain the majority of the pixels and then testing each circle against other shapes. To enhance performance I created perimeter circles around each structure and only test these larger circles until two structures are close enough to collide.
The real problem is that it is very difficult to collide a rotatable rectangle, for example, into one of these image structures. Filling a rectangle with circles also just does not seem efficient. Not to mention that I'm getting combinatoric explosions that make looping very complex and poor performance.
Given that many open source libraries designed by physics experts already exist, it seems counter productive to be doing anything from scratch.
Anyone know a better way to handle this type of collision?
Good 2d Collision Engine?
Aucun commentaire:
Enregistrer un commentaire