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