Collision happened too early (SOLVED)

I try make game for ld, but i have a problem. In my game collison happened before hero collide with border.

my sources:https://github.com/d954mas/ld38

why this can happened? can it be becouse i use small projection size(128x72) ?

use projection 1280x720 all work as i excepted. Is it bug of defold, or box2d issue?

Ok, so the game happens on 128x72 pixels and you zoom that game area in the render script? It feels like a precision thing in Box2d or something like that.

Yes. I think that is something with precision too. Box2d use virtual meters. Is 1 pixel = 1 box2d meter? My collider have size about 150x5, if it 150x5 meters it is realy big, and can’t have problem with precision.

I can change scale for box2d in game.project. Default value is 0.02, so i change to 0.1 and all work as i need.

1 Like