NGUI position to World position
Unity3D 2015. 8. 27. 20:13Vector3 v = Camera.main.WorldToScreenPoint( building.center.position );
v.x = ( v.x / Screen.width ) * 720.0f;
v.y = ( v.y / Screen.height ) * 1280.0f;
uiSelectItem.transform.localPosition = v - new Vector3( 720.0f / 2.0f, 1280.0f / 2.0f, 0.0f );
var worldToViewportPoint = this.cameraForTarget.WorldToViewportPoint(pos);
var viewportToWorldPoint
= this.cameraForUi.ViewportToWorldPoint(worldToViewportPoint);
'Unity3D' 카테고리의 다른 글
world to ngui (0) | 2015.10.02 |
---|---|
Text 한글자씩 나오게 하는 방법. (0) | 2015.08.31 |
Linear Translation (0) | 2015.08.27 |
타일맵 생성 ( isometric ) (0) | 2015.08.26 |
astar_test 5 (0) | 2015.08.24 |