Closed lomirus closed 6 months ago
I would generally suggest making gizmos that wrap objects like this a tiny bit larger than their object. That will avoid the z-fighting that you're seeing here. There may be a good engine-level fix too though.
You could also set the depth_bias
in the GizmoConfig
to something slightly negative like -0.01
. This should fix your problem by rendering all gizmo lines as if they were slightly closer to the camera.
I'm content with the depth_bias solution: that's exactly what I had in mind :) Docs for it seem good, although they're not super discoverable.
Bevy version
0.13.1
What you did
I want to draw the circle gizmos on a sphere:
Click to expand the example code
```rust use bevy::prelude::*; use std::f32::consts::PI; pub(crate) const EARTH_RADIUS: f32 = 100.0; fn init( mut commands: Commands, mut meshes: ResMutWhat went wrong
The circle gizmos became dotted line. I think it's because the circle gizmos are not real "circle" and so some segments are behind the sphere surface.
Additional information