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.
\$\begingroup\$
\$\endgroup\$
2
-
\$\begingroup\$ Box2D is open source and has been ported to Java. Why not see how they do it? \$\endgroup\$– ClassicThunderCommented Feb 23, 2012 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\$– DRiFTyCommented Feb 23, 2012 at 18:00
Add a comment
|
1 Answer
3
-
\$\begingroup\$ This a really great resource, thanks for posting that. \$\endgroup\$– DRiFTyCommented Feb 23, 2012 at 18:33
-
-
\$\begingroup\$ This is the way I am going to go, I think I can definitely get it to work using one of these algorithms. Thanks a lot! \$\endgroup\$– DRiFTyCommented Feb 24, 2012 at 17:34