mirror of
https://github.com/eliasstepanik/big_space_with_trim.git
synced 2026-01-10 23:58:28 +00:00
New formatting fix
This commit is contained in:
parent
21b9f31288
commit
8118c11980
@ -44,11 +44,11 @@ fn setup(
|
||||
..default()
|
||||
},
|
||||
GridCell::<i128>::default(), // All spatial entities need this component
|
||||
FloatingOrigin, // Important: marks this as the entity to use as the floating origin
|
||||
FloatingOrigin, // Important: marks this as the entity to use as the floating origin when propagating transforms for rendering.
|
||||
CameraController::default() // Built-in camera controller
|
||||
.with_max_speed(10e35)
|
||||
.with_smoothness(0.95, 0.9)
|
||||
.with_speed(1.5),
|
||||
.with_speed(1.0),
|
||||
));
|
||||
|
||||
let mesh_handle = meshes.add(
|
||||
@ -143,8 +143,12 @@ fn highlight_nearest_sphere(
|
||||
objects: Query<&GlobalTransform>,
|
||||
mut gizmos: Gizmos,
|
||||
) {
|
||||
let Some((entity, _)) = cameras.single().nearest_object() else { return };
|
||||
let Ok(transform) = objects.get(entity) else { return };
|
||||
let Some((entity, _)) = cameras.single().nearest_object() else {
|
||||
return;
|
||||
};
|
||||
let Ok(transform) = objects.get(entity) else {
|
||||
return;
|
||||
};
|
||||
let (scale, rotation, translation) = transform.to_scale_rotation_translation();
|
||||
gizmos
|
||||
.sphere(translation, rotation, scale.x * 0.505, Color::RED)
|
||||
|
||||
@ -73,7 +73,7 @@ fn toggle_plugin(
|
||||
.join(",") // separator
|
||||
};
|
||||
|
||||
text.single_mut().sections[0].value =
|
||||
text.single_mut().sections[0].value =
|
||||
format!("Press Spacebar to toggle: {msg}\nCamera distance to floating origin: {}\nCubes distance from origin: {}", thousands(dist), thousands(DISTANCE))
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user