In Godot, from what I can see, you must hand draw polygon colliders or use a primitive shape like a capsule. I need to do pixel perfect collisions with hundreds of frames on a sprite sheet. Thus I need to be able to have the bit mask of the sprite given as the collider shape. Like you can do in pygame. How do you do that in GODOT?
How do you do pixel perfect Collisions in GODOT ENGINE
2.9k Views Asked by Have Mercy At
2
There are 2 best solutions below
4

You have two main options for pixel perfect collisions in Godot (neither of which are built in):
- You can write a system that can create polygon colliders from your image. Thus, just using polygon colliders in runtime.
- You can write a new collision system that can use aabb collision for broad phase and image data for precise phase.
However, 99% of the time pixel perfect collision is not required and not efficient. So, if you could give us more information on why you want to have pixel perfect collision, then we may be able to help you more.
A brief answer would be:-
It obviously takes a bit of code to do this, but this is the general idea that I've used before.