chore(fields): make gizmos higher res
Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
@@ -76,14 +76,16 @@ fn draw_field_gizmos(mut gizmos: Gizmos) {
|
|||||||
match f.shape.lock().clone() {
|
match f.shape.lock().clone() {
|
||||||
Shape::Box(size) => gizmos.cuboid(transform.with_scale(size.into()), color),
|
Shape::Box(size) => gizmos.cuboid(transform.with_scale(size.into()), color),
|
||||||
Shape::Cylinder(CylinderShape { length, radius }) => {
|
Shape::Cylinder(CylinderShape { length, radius }) => {
|
||||||
gizmos.primitive_3d(
|
gizmos
|
||||||
|
.primitive_3d(
|
||||||
&Cylinder {
|
&Cylinder {
|
||||||
radius,
|
radius,
|
||||||
half_height: length * 0.5,
|
half_height: length * 0.5,
|
||||||
},
|
},
|
||||||
transform.to_isometry(),
|
transform.to_isometry(),
|
||||||
color,
|
color,
|
||||||
);
|
)
|
||||||
|
.resolution(32);
|
||||||
}
|
}
|
||||||
Shape::Sphere(radius) => {
|
Shape::Sphere(radius) => {
|
||||||
gizmos.sphere(transform.to_isometry(), radius, color);
|
gizmos.sphere(transform.to_isometry(), radius, color);
|
||||||
@@ -98,14 +100,17 @@ fn draw_field_gizmos(mut gizmos: Gizmos) {
|
|||||||
major_radius = radius_b;
|
major_radius = radius_b;
|
||||||
minor_radius = radius_a;
|
minor_radius = radius_a;
|
||||||
}
|
}
|
||||||
gizmos.primitive_3d(
|
gizmos
|
||||||
|
.primitive_3d(
|
||||||
&Torus {
|
&Torus {
|
||||||
minor_radius,
|
minor_radius,
|
||||||
major_radius,
|
major_radius,
|
||||||
},
|
},
|
||||||
transform.to_isometry(),
|
transform.to_isometry(),
|
||||||
color,
|
color,
|
||||||
);
|
)
|
||||||
|
.minor_resolution(32)
|
||||||
|
.major_resolution(32);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user