mgecumshooter/esotera
fixed chunk disappearing while standing inside of this chunk
Commit 57d803541ec5 · mgecumshooter · 2026-10-21 15:22 +0300
Comments
No comments yet.
Diff
diff --git a/src/chunk/mod.rs b/src/chunk/mod.rs
--- a/src/chunk/mod.rs
+++ b/src/chunk/mod.rs
@@ -75,6 +75,10 @@
let half_fov = (cam.fovy.to_radians() / 2f32) * 1f32;
let angular_margin = (radius / dist).atan();
+ if dist <= CHUNK_SIZE as f32 {
+ return true;
+ }
+
cos_angle.acos() <= half_fov + angular_margin
}