https://developer.microsoft.com/en-us/windows/mixed-reality/spatial_mapping_in_unity#using_the_built-in_spatial_mapping_components



1. 홀로툴킷의 SpatialMapping 컴포넌트는 매우 간편하고 신속한 길을 제공

2. Lower level spatial mapping API는 full control을 제공하고 명확하고 세련된 애플리케이션 커스터마이제이션을 가능하게 한다



유니티 빌트인 컴포넌트 시작하기


Spatial Mapping Renderer 와 Spatial Mapping Collider 를 제공함


Spatial Mapping Renderer - 메쉬의 시각화


Spatial Mapping Collider - 메쉬와 홀로그래픽 컨텐츠의 상호작용 예) 물리력



빌트인 컴포넌트 사용하기


1. spatial surface mesh를 찾고싶은 구역 가운데에 있는 게임오브젝트를 선택

2. Inspector 창에서 Add Component > AR > Spatial Mapping Collider or Spatial Mapping Renderer.



로우레벨 SpatialMapping API 사용하기


네임스페이스 - UnityEngine.VR.WSA


타입 - SurfaceObserver, SurfaceChange, SurfaceData, SrufaceId


SurfaceObserver 세팅하기


SurfaceObserver surfaceObserver;


void Start()
{
    surfaceObserver = new SurfaceObserver();    //생성

//surfaceObserver.SetVolumeAsAxisAlignedBox, SetVolumeAsSphere 등으로 공간의 구역 정의

//SurfaceObserver.Update 사용하려면 새로운 데이터를 가진 매핑 시스템 지역의 각각의 spatial surface에 대해 핸들러를 정의해야함

}

private void OnSurfaceChanged(SurfaceId surfaceId, SurfaceChange changeType, Bounds bounds, System.DataTime updateTime)
{
    //see Handling Surface Changes

}


Handling Surface Changes



+ Recent posts