Skip to content

Commit 1456a78

Browse files
committed
refactor(zone): use zoneable zone distance
1 parent c7d1e8a commit 1456a78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/nodes/spatial/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ use mint::Vector3;
1515
use parking_lot::Mutex;
1616
use rustc_hash::FxHashMap;
1717
use std::fmt::Debug;
18-
use std::ptr;
1918
use std::sync::{Arc, OnceLock, Weak};
19+
use std::{f32, ptr};
2020
use stereokit_rust::maths::Bounds;
2121

2222
stardust_xr_server_codegen::codegen_spatial_protocol!();
@@ -242,7 +242,7 @@ impl Spatial {
242242
.upgrade()
243243
.map(|zone| zone.field.clone())
244244
.map(|field| field.distance(self, vec3a(0.0, 0.0, 0.0)))
245-
.unwrap_or(f32::MAX)
245+
.unwrap_or(f32::NEG_INFINITY)
246246
}
247247
}
248248
impl AspectIdentifier for Spatial {

0 commit comments

Comments
 (0)