Skip to content

Commit

Permalink
Merge pull request #25 from aevyrie/floating-origin-clipping
Browse files Browse the repository at this point in the history
Floating origin clipping fix
  • Loading branch information
aevyrie authored Oct 9, 2024
2 parents 72c7e63 + 22251d9 commit fff42d3
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions examples/floating_origin.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
use bevy::{color::palettes, prelude::*};
use bevy_editor_cam::{controller::component::EditorCam, DefaultEditorCamPlugins};
use bevy_editor_cam::{
controller::component::EditorCam,
prelude::{projections::PerspectiveSettings, zoom::ZoomLimits},
DefaultEditorCamPlugins,
};
use bevy_mod_picking::DefaultPickingPlugins;
use big_space::{
commands::BigSpaceCommands,
Expand Down Expand Up @@ -43,7 +47,17 @@ fn setup(
..default()
},
FloatingOrigin, // Important: marks the floating origin entity for rendering.
EditorCam::default(),
EditorCam {
zoom_limits: ZoomLimits {
min_size_per_pixel: 1e-20,
..Default::default()
},
perspective: PerspectiveSettings {
near_clip_limits: 1e-20..0.1,
..Default::default()
},
..Default::default()
},
));

let mesh_handle = meshes.add(Sphere::new(0.5).mesh().ico(32).unwrap());
Expand Down

0 comments on commit fff42d3

Please sign in to comment.