Closed Pascualex closed 1 year ago
You can configure lyon to work better with your scale with FillOptions
and StrokeOptions
.
let shape = shapes::Circle {
radius: 1.0,
..default()
};
commands.spawn(GeometryBuilder::build_as(
&shape,
DrawMode::Fill(FillMode {
options: FillOptions::tolerance(0.01),
color: Color::BLACK,
}),
Transform::default(),
));
Sounds great, thanks for the pointer.
The ideal solution would be dynamic based on the viewport size. But my understanding is that the path generated by the circle is defined at creation and static.
At least this will mitigate the issue.
I'm currently configuring my camera with
ScalingMode::FixedVertical
, like so:I do this because I want to use distance units for my transforms and not pixels. It also makes the experience more consistent between screens with different pixel densities.
The problem is that
bevy_prototype_lyon
doesn't seem to support this configuration. Now, when I spawn a circle with radius 1 the edges are so rough that I can even count the number of edges (8).