bevy_ecs_ldtk
bevy_ecs_ldtk copied to clipboard
Fix levels having incorrect `GlobalTransform` the first frame
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.