junhyungPARK78 / chuchuUnity

0 stars 0 forks source link

마우스 컨트롤 가능하게 하기 #11

Closed junhyungPARK78 closed 1 year ago

junhyungPARK78 commented 1 year ago

참고 url

Vector2 pos = Camera.main.ScreenToWorldPoint(Input.mousePosition);

junhyungPARK78 commented 1 year ago

월드 포지션 취득할 때 x좌표만 필요한 경우에는 아래와 같이 해 주면 된다.

float xPos = Camera.main.ScreenToWorldPoint(cameraPosition).x;