bug
This commit is contained in:
parent
d19cf2fead
commit
acb5d28826
|
@ -18,7 +18,7 @@ public class DistanceMeasurement : MonoBehaviour
|
|||
{
|
||||
if (isPathCanBePlanned)
|
||||
{
|
||||
if (Input.GetMouseButtonDown(0)&& IsPointerOverUI())
|
||||
if (Input.GetMouseButtonDown(0)&& !IsPointerOverUI())
|
||||
{
|
||||
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||
RaycastHit hit;
|
||||
|
@ -27,7 +27,7 @@ public class DistanceMeasurement : MonoBehaviour
|
|||
AddMarker(hit.point);
|
||||
}
|
||||
}
|
||||
if (Input.GetMouseButtonDown(1) && IsPointerOverUI())
|
||||
if (Input.GetMouseButtonDown(1) && !IsPointerOverUI())
|
||||
{
|
||||
ClearMarkers();
|
||||
}
|
||||
|
@ -59,6 +59,7 @@ public class DistanceMeasurement : MonoBehaviour
|
|||
newMarkers[markers.Length] = go.transform;
|
||||
markers = newMarkers;
|
||||
unmannedAerialVehicleManage.positions.Enqueue(go.transform.position);
|
||||
go.transform.SetParent(transform);
|
||||
}
|
||||
|
||||
// 根据新的标记点数组重新绘制路径
|
||||
|
|
Loading…
Reference in New Issue