This commit is contained in:
parent
627f63211d
commit
57091d7e9e
|
@ -505,13 +505,7 @@ impl GlobalTransformExt for GlobalTransform {
|
||||||
);
|
);
|
||||||
let closest =
|
let closest =
|
||||||
closest_points(&pos1, &*collider.raw, &pos2, &*other_collider.raw, f32::MAX).unwrap();
|
closest_points(&pos1, &*collider.raw, &pos2, &*other_collider.raw, f32::MAX).unwrap();
|
||||||
let distance = distance(
|
let distance = distance(&pos1, &*collider.raw, &pos2, &*other_collider.raw).unwrap() as u32;
|
||||||
&pos1,
|
|
||||||
&*collider.raw,
|
|
||||||
&pos2,
|
|
||||||
&*other_collider.raw,
|
|
||||||
)
|
|
||||||
.unwrap() as u32;
|
|
||||||
let tile_or_tiles = if distance == 1 { "tile" } else { "tiles" };
|
let tile_or_tiles = if distance == 1 { "tile" } else { "tiles" };
|
||||||
if distance > 0 {
|
if distance > 0 {
|
||||||
if let ClosestPoints::WithinMargin(p1, p2) = closest {
|
if let ClosestPoints::WithinMargin(p1, p2) = closest {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user