-
마우스 이동량 만큼 3d object 이동 시키기
screen 이동량 기준으로 world object 이동 시킴
Vector3 objsp = mCam.WorldToScreenPoint(hitobj.transform.position); objsp += mouseposNew -mouseposOld; hitobj.transform.position = mCam.ScreenToWorldPoint(objsp);
'Unity' 카테고리의 다른 글
Unity - Vector3 rotate (vector 회전) (0) 2021.03.20 Unity - Rigidbody.AddForce (0) 2021.03.20 Unity - singleton pattern (static, global) (0) 2021.03.20 Unity - Mouse (object event) (0) 2021.03.20 Unity - Ray (0) 2021.03.19 Unity - Translate (0) 2021.03.18 Unity - Mouse (Input class) (0) 2021.03.18 Unity - Material (0) 2021.03.18