Commit 6c928e27 authored by 17김현학's avatar 17김현학

bug fix

parent 99e84d90
...@@ -21,8 +21,8 @@ public class Square : FlatLandObject ...@@ -21,8 +21,8 @@ public class Square : FlatLandObject
return v.y / v.x; return v.y / v.x;
} }
public Vector3 GetMiddlePoint(int st, int en) public Vector3 GetDestPoint(int n)
{ {
return ((pathList[en] - pathList[st]) / 2) + pathList[st]; return pathList[n+1];
} }
} }
\ No newline at end of file
...@@ -44,7 +44,7 @@ public class UIManager : MonoBehaviour ...@@ -44,7 +44,7 @@ public class UIManager : MonoBehaviour
{ {
pathName.text = obj.name; pathName.text = obj.name;
//_pathUI.transform.position = middlePoint; //_pathUI.transform.position = middlePoint;
_pathUI.transform.position = middlePoint + (square.GetMiddlePoint(pathNum, pathNum + 1) + new Vector3(0,300,0)) * 2; _pathUI.transform.position = middlePoint + (square.GetDestPoint(pathNum) + new Vector3(0,300,0)) * 2.5f;
//Debug.Log(square.GetMiddlePoint(pathNum, pathNum + 1)); //Debug.Log(square.GetMiddlePoint(pathNum, pathNum + 1));
_pathUI.SetActive(true); _pathUI.SetActive(true);
prevSelectPathNum = pathNum; prevSelectPathNum = pathNum;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment