Skip to content

Commit 1fc87e2

Browse files
feat(spatial): add BVH spatial indexing (#664)
- Add `FollowClosestPlayer` component to make `/spawn` entities follow the nearest player - Move `PlayerBoundingBoxes` from `hyperion` into new `spatial` crate as `SpatialIndex` - Change `get_collisions` to return iterator instead of using callback - Update Rust nightly from `2024-11-29` to `2024-12-07` - Fixes #665
1 parent 22d628c commit 1fc87e2

File tree

22 files changed

+791
-686
lines changed

22 files changed

+791
-686
lines changed

Cargo.lock

Lines changed: 12 additions & 102 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
[profile]
21
[profile.release-debug]
32
debug = true
43
inherits = 'release'
@@ -38,6 +37,7 @@ members = [
3837
'crates/geometry',
3938
'crates/simd-utils',
4039
'crates/system-order',
40+
'crates/spatial',
4141
]
4242
resolver = '2'
4343

@@ -208,6 +208,9 @@ path = 'crates/simd-utils'
208208
[workspace.dependencies.system-order]
209209
path = 'crates/system-order'
210210

211+
[workspace.dependencies.spatial]
212+
path = 'crates/spatial'
213+
211214
[workspace.dependencies.tokio-util]
212215
features = ['full']
213216
version = '0.7.12'

crates/bvh-region/Cargo.toml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
harness = false
33
name = "sort"
44

5-
[[bench]]
6-
harness = false
7-
name = "bvh"
8-
9-
[[bench]]
10-
harness = false
11-
name = "side_by_side"
5+
#[[bench]]
6+
#harness = false
7+
#name = "bvh"
8+
#
9+
#[[bench]]
10+
#harness = false
11+
#name = "side_by_side"
1212

1313
[dependencies]
1414
geometry = {workspace = true}
@@ -20,17 +20,15 @@ plotters = {workspace = true, features = [
2020
plotters-bitmap = {workspace = true, optional = true}
2121
arrayvec = {workspace = true}
2222
fastrand = {workspace = true}
23-
itertools = {workspace = true}
2423
ordered-float = {workspace = true}
2524
rayon = {workspace = true}
2625
tracing = {workspace = true}
2726

2827
[dev-dependencies]
2928
criterion = {workspace = true}
30-
divan = {workspace = true}
29+
#divan = {workspace = true}
3130
rand = {workspace = true}
32-
tango-bench = {workspace = true}
33-
tracing-subscriber = {workspace = true}
31+
#tango-bench = {workspace = true}
3432

3533
[features]
3634
default = []

0 commit comments

Comments
 (0)