- Home /
How to achieve 2D pixel perfect collision physics (like Badland) in Unity3D ?
https://www.youtube.com/watch?v=FQ6FmPzoAbU
Above is the example of the kind of collisions I'm aiming for. Is Pixel Perfect collision a possibility ?
A PolygonCollider2D on everything is the only way I can see it happening, which will decrease the performance. Also, for animations with spritesheets, how do you animate the shape of the PolygonCollider2D for every different frame ?
Thanks for your interest and help.
Hey man, were you able to implement a pixel perfect collision??
Answer by $$anonymous$$ · Nov 16, 2018 at 01:15 AM
I created a free c# script that does this automatically... https://github.com/RandomiaGaming/Unity-PixelPerfectPolygonCollider2D
Answer by Athomield3D · Dec 30, 2014 at 01:22 PM
I wouldn't recommend working with pixel perfect colliders, instead, use polygon collider and adjust it using Shift if (I'm not wrong) to achieve almost the same shape if the sprite.
Your answer
![](https://koobas.hobune.stream/wayback/20220613155102im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Collision detection not working properly with 2D sprites 1 Answer
How to check if sprites are overlapping and by how much? 0 Answers
Trigger Animation doesn't work, please help me. 1 Answer
Stop moving when colliding. 2D 1 Answer
2D collisions on a Game Object Sprite with transparent areas 2 Answers