From eaaac52b256a64a1a349c413ae521e7d9a842f64 Mon Sep 17 00:00:00 2001 From: Yuki Furuta Date: Thu, 14 Apr 2022 22:21:27 +0900 Subject: [PATCH] match unity-axis and ros-axis about rays --- Runtime/Scripts/Sensors/LIDAR/ZOLIDAR2D.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/Scripts/Sensors/LIDAR/ZOLIDAR2D.cs b/Runtime/Scripts/Sensors/LIDAR/ZOLIDAR2D.cs index d314cde..2a87e29 100644 --- a/Runtime/Scripts/Sensors/LIDAR/ZOLIDAR2D.cs +++ b/Runtime/Scripts/Sensors/LIDAR/ZOLIDAR2D.cs @@ -154,7 +154,7 @@ protected override void ZOFixedUpdateHzSynchronized() { // do raycasts // TODO: use batch raycasts like the 3d raycast for (int i = 0; i < _rayCount; i++) { - Vector3 axis = new Vector3(0, MinAngleDegrees - AngleIncrementDegrees * i, 0); + Vector3 axis = new Vector3(0, -1 * MinAngleDegrees - AngleIncrementDegrees * i, 0); Vector3 direction = Quaternion.Euler(axis) * transform.forward; _rays[i] = new Ray(transform.position, direction); _ranges[i] = 0;