I am starting to try and figure out polygon collision detection in my Android game. I am currently doing pixel level collision detection and it just seems to be too slow (though it works). I was looking at this tool and it seems like it would be really handy to give me a set of vertices for my images. Does anyone have any ideas about how I should go about implementing this? Basically once I have a list of vertices that form a polygon, how can I detect if polygon A intersects polygon B? I can see that these vertices can be used easily with Box2D but I want to try to do this without Box2D first.
2
-
\$\begingroup\$ Box2D is open source and has been ported to Java. Why not see how they do it? \$\endgroup\$ – ClassicThunder Feb 23 '12 at 17:56
-
\$\begingroup\$ @ClassicThunder: True haha, I am looking at the source right now. As I expected it seems complicated, but I will continue to see if I can get something out of it. Thanks, I hadn't thought about that. Maybe I should just give in and use Box2D haha. \$\endgroup\$ – DRiFTy Feb 23 '12 at 18:00
Add a comment
|
3