diff --git a/src/core.rs b/src/core.rs index ac8755e..2e1c2a7 100644 --- a/src/core.rs +++ b/src/core.rs @@ -493,15 +493,13 @@ impl GlobalTransformExt for GlobalTransform { ) -> String { use bevy::math::Vec3Swizzles; let scale = PHYSICS_SCALE.read().unwrap(); - let (_, rotation, _) = self.to_scale_rotation_translation(); let pos1 = Isometry::new( (self.translation() / *scale).xy().into(), - rotation.to_scaled_axis().z, + self.yaw().radians(), ); - let (_, other_rotation, _) = self.to_scale_rotation_translation(); let pos2 = Isometry::new( (other.translation() / *scale).xy().into(), - other_rotation.to_scaled_axis().z, + other.yaw().radians(), ); let closest = closest_points(&pos1, &*collider.raw, &pos2, &*other_collider.raw, f32::MAX).unwrap();