mirror of
https://github.com/eliasstepanik/big_space_with_trim.git
synced 2026-01-11 18:48:27 +00:00
New formatting fix
This commit is contained in:
parent
21b9f31288
commit
8118c11980
@ -44,11 +44,11 @@ fn setup(
|
|||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
GridCell::<i128>::default(), // All spatial entities need this component
|
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
|
CameraController::default() // Built-in camera controller
|
||||||
.with_max_speed(10e35)
|
.with_max_speed(10e35)
|
||||||
.with_smoothness(0.95, 0.9)
|
.with_smoothness(0.95, 0.9)
|
||||||
.with_speed(1.5),
|
.with_speed(1.0),
|
||||||
));
|
));
|
||||||
|
|
||||||
let mesh_handle = meshes.add(
|
let mesh_handle = meshes.add(
|
||||||
@ -143,8 +143,12 @@ fn highlight_nearest_sphere(
|
|||||||
objects: Query<&GlobalTransform>,
|
objects: Query<&GlobalTransform>,
|
||||||
mut gizmos: Gizmos,
|
mut gizmos: Gizmos,
|
||||||
) {
|
) {
|
||||||
let Some((entity, _)) = cameras.single().nearest_object() else { return };
|
let Some((entity, _)) = cameras.single().nearest_object() else {
|
||||||
let Ok(transform) = objects.get(entity) else { return };
|
return;
|
||||||
|
};
|
||||||
|
let Ok(transform) = objects.get(entity) else {
|
||||||
|
return;
|
||||||
|
};
|
||||||
let (scale, rotation, translation) = transform.to_scale_rotation_translation();
|
let (scale, rotation, translation) = transform.to_scale_rotation_translation();
|
||||||
gizmos
|
gizmos
|
||||||
.sphere(translation, rotation, scale.x * 0.505, Color::RED)
|
.sphere(translation, rotation, scale.x * 0.505, Color::RED)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user