bevy_ecs_ldtk icon indicating copy to clipboard operation
bevy_ecs_ldtk copied to clipboard

Fix levels having incorrect `GlobalTransform` the first frame

Open johanhelsing opened this issue 1 year ago • 1 comments

The transform propagation system runs in the PostUpdate stage, so spawn the levels before PostUpdate so they have time to propagate, but after ProcessApi, so they'll be ready the next frame (assuming the LdtkWorldBundle will be spawned during the Update) stage.

I ran into this bug because in my game I scale the levels, and collision detection is therefore way off during the first frame sending my player character flying.

johanhelsing avatar Nov 23 '22 18:11 johanhelsing