Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for spatial queries #70

Merged
merged 6 commits into from
Jul 12, 2023
Merged

Fixes for spatial queries #70

merged 6 commits into from
Jul 12, 2023

Conversation

Jondolf
Copy link
Owner

@Jondolf Jondolf commented Jul 11, 2023

  • Fixed an issue where spatial queries weren't detecting colliders of entities with a generation of over 0 (i.e. spawned multiple times)
  • Fixed removal detection so that collider removals aren't missed
  • Fixed shape caster ignore_origin_penetration that did the opposite of what it was supposed to do
  • Refactored spatial query pipeline code, e.g. the pipeline now stores the colliders, so calling the query methods doesn't query the ECS to get the colliders each time

Some parts only used the entity index and not the generation, so
the entities couldn't be detected.

Entity removals are now detected at the end of each frame to avoid misses.

The spatial query pipeline now contains the colliders, and they're
updated on each frame or using
`SpatialQuery::update_pipeline()`.
This avoids querying for the colliders each time a spatial query
method is called.
@Jondolf Jondolf added enhancement New feature or request bugfix Fixes a bug labels Jul 11, 2023
@Jondolf Jondolf linked an issue Jul 11, 2023 that may be closed by this pull request
@Jondolf Jondolf merged commit e11b0fd into main Jul 12, 2023
3 checks passed
@Jondolf Jondolf deleted the spatial-query-fixes branch July 12, 2023 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes a bug enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash related to despawning entity
1 participant