I am making a 2D XNA Game, using Farseer Physics for collisions.
I need collisions to be resolved against the actual shape of the sprite image, ignoring transparent pixels, rather than against the edge of the bounding rectangle.
|
I am making a 2D XNA Game, using Farseer Physics for collisions. I need collisions to be resolved against the actual shape of the sprite image, ignoring transparent pixels, rather than against the edge of the bounding rectangle. |
|||||||||
|
|
I am not sure what you mean by rendering... I think you meant how you would create a specific shape using Farseer Physics. Using this code:
-http://stackoverflow.com/questions/7189691/create-a-body-of-a-irregular-2d-sprite-in-farseer You will be able to create a custom Body that has the shape of your desired sprite(you can see this in Farseer's Debug View). If you let Farseer handle the collisions then you should get the desired collision as you have described above. I also recommend taking a look at their documentation: http://farseerphysics.codeplex.com/documentation |
|||
|
|