Pixel Collision - Detecting corners

Posted by Milkboat on Game Development See other posts from Game Development or by Milkboat
Published on 2012-04-11T17:08:32Z Indexed on 2012/04/11 17:42 UTC
Read the original article Hit count: 297

Filed under:
|
|

How would I go about detecting the corners of a texture when I use pixel collision detection? I read about corner collision with rectangles, but I am unsure how to adapt it to my situation.

Right now my map is tile based and I do rectangular collision until the player is intersecting with a blocked tile, then I switch to pixel collision.

The effect I would like to achieve is when the player hits the corner of an object to push him around the side so he doesn't just hit the edge and stop.

Any ideas?

© Game Development or respective owner

Related posts about XNA

Related posts about 2d