Open johanhelsing opened 1 year ago
I have to give this some thought. I'd prefer not to add another stage if possible, but I can't think of a way to off the top of my head. One reason I wanted to put level spawning before Update
was so that users could flesh out entities using the "blueprint pattern" (querying for Added<EntityInstance>
or Added<MarkerComponent>
) during Update
and not have any frame delay. Though, this seems like a reasonable concern too.
The transform propagation system runs in the
PostUpdate
stage, so spawn the levels beforePostUpdate
so they have time to propagate, but afterProcessApi
, so they'll be ready the next frame (assuming the LdtkWorldBundle will be spawned during theUpdate
) 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.