Why is this a collision?

Look at this screenshot:
Fx71zZI.png

You can see that the object aren’t actually right next to each other.

The green block is one pixel lower than the brown block. But it’s still a collision.

Why is that?

Collisions are not a graphics determination, they are a physics calculation. The corner is quite clearly touching the other corner, however, and in the physics world this will be calculated as a collision. Whether it is a significant collision or a simple, light touch is academic - it is reported using the collision event.

You can get a visual representation of your physics bodies using this:

physics.setDrawMode( "hybrid" )

Why is the hitbox one pixel bigger than my image?

Do you have transparency in your image? If you don’t theybtry to crop the image or make a copy and try croping it for a test?.. If anything you can try physics editor (search that on Google) and make a custom body for it…? Good Luck!

Collisions are not a graphics determination, they are a physics calculation. The corner is quite clearly touching the other corner, however, and in the physics world this will be calculated as a collision. Whether it is a significant collision or a simple, light touch is academic - it is reported using the collision event.

You can get a visual representation of your physics bodies using this:

physics.setDrawMode( "hybrid" )

Why is the hitbox one pixel bigger than my image?

Do you have transparency in your image? If you don’t theybtry to crop the image or make a copy and try croping it for a test?.. If anything you can try physics editor (search that on Google) and make a custom body for it…? Good Luck!