I'm trying to create pixel perfect collision detection but I don't know how to handle collisions when there is a jump. Here I have one image of a sample map:
But maybe I had a bad supposition assuming that all the pixels are little collision points.
I mean , there is no differences between y-axis collision and x-axis collision in my collision map.
I have been treating each axis collision split, but that is bad done when diagonal jump have been made, cause you'll get an error in x or in y while correcting the position.
Then I thought that maybe I was wrong in my supposition that I didn't need to split for pixel collision type.
I will resume it in 2 questions:
- how can I handle pixel perfect collisions for a platformer?
- if I'm doing it well, How to manage the x-axis, y-axis problem?
P.S: My 'player' uses a box collider.