Collision for mobile game

Posted by zemiguel12 on Game Development See other posts from Game Development or by zemiguel12
Published on 2013-06-27T20:09:14Z Indexed on 2013/06/27 22:29 UTC
Read the original article Hit count: 153

Filed under:
|

I'm writing a little game in as3 using Starling, and I need to check collision between 2 boats that can rotate. I don't need the pixel perfect collision, but bounds collision is not enough too. The boat look more or less like this:

https://www.dropbox.com/s/197yqvzf2jaugtm/boats.JPG

I was thinking about create one square on the back of the boat and a triangle on the front, than for each boat, check if the square collide with the other boat square or triangle, and the same for the triangle.

I just don't know how to do that, I don't know if it's possible with the Shape.hitTest, or if it's the best way to do that.

What can I do?

© Game Development or respective owner

Related posts about collision-detection

Related posts about flash