<fix> 버그 수정 (hover시 mat 설정, 에러 mat 설정, 환경설정-다른 프로그램 열기 설정, 팝업 위치 설정)
This commit is contained in:
@@ -7,6 +7,7 @@ public class PointManagerView : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private GameObject pointPrefab;
|
||||
private List<GameObject> activePoints = new List<GameObject>();
|
||||
public Transform robotBaseTransform; // 로봇좌표의 기준이 되는 축 위치
|
||||
|
||||
[SerializeField] public GameObject movingAlert;
|
||||
[SerializeField]
|
||||
@@ -28,8 +29,21 @@ public class PointManagerView : MonoBehaviour
|
||||
|
||||
public void CreatePoint(RobotData pose, int index)
|
||||
{
|
||||
Vector3 position = ConvertRobotDataToVector3(pose);
|
||||
GameObject pointObj = Instantiate(pointPrefab, position, Quaternion.identity, this.transform);
|
||||
Vector3 localPos = ConvertRobotDataToVector3(pose);
|
||||
Vector3 worldPos = localPos;
|
||||
|
||||
// 로봇 Base가 있다면, 로컬 좌표를 월드 좌표로 변환
|
||||
if (robotBaseTransform != null)
|
||||
{
|
||||
worldPos = robotBaseTransform.TransformPoint(localPos);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("PointManagerView: RobotBaseTransform이 할당되지 않아 월드 원점 기준으로 생성됩니다.");
|
||||
}
|
||||
|
||||
// 변환된 월드 좌표에 생성
|
||||
GameObject pointObj = Instantiate(pointPrefab, worldPos, Quaternion.identity, this.transform);
|
||||
activePoints.Add(pointObj);
|
||||
|
||||
RobotPoint pointComponent = pointObj.GetComponent<RobotPoint>();
|
||||
|
||||
Reference in New Issue
Block a user