bevy_xpbd icon indicating copy to clipboard operation
bevy_xpbd copied to clipboard

How to prevent collision Between Entities spawning in the same frame

Open IronGremlin opened this issue 1 year ago • 0 comments
trafficstars

Entities created with a collider will not be queryable via the spatial index during the frame in which they are created unless one both manually calls SpatialQuery::update_pipeline (which is fairly well documented), AND adds a Position and Rotation component (which AFAICT is not at all documented).

FWIW, I'm not terribly sure where the best place to document that would be, but from my (admittedly limited) perspective it seems like update_pipeline should just kind of do this backfill for you - would you be open to a PR to that effect, or have I misunderstood the purpose of this function?

If that's not a good idea, and we can't figure out a sensible place to put a warning label (or if I am just an idiot and this warning label already exists and I just didn't see it), then a closed issue like this one would've saved me a good 4-5 hours worth of head scratching, so, no hard feelings if you want to toss this in the bin as "closed won't fix."

IronGremlin avatar May 29 '24 16:05 IronGremlin