유니티(Unity) OVR OneGrabTranslateTransformer에서 constraints역할

Constraints Are Relative /  Constraint

 

OneGrabTranslateTransformer컴포넌트를 사용하다보면 Constraints Are Relative도 있고Constraint도 있습니다.

Constraints Are Relative를 체크하면 좌표계가 World좌표계를 사용하지 않고 그 오브젝트의 Local좌표계를 사용할 수 있게 됩니다.
Constraints 를 체크하면 Position값에 제약을 둘 수 있습니다. 체크를 하지 않는다면 해당 축으로는 제약이 없어집니다.

Constraints Are Relative를 체크하지 않으면 World좌표계를 사용하게 됨

 

Constraints Are Relative를 체크하지 않으면 World좌표계를 사용하게 됩니다.
따라서 오브젝트를 잡았을 때 원래의 Position을 지켜주고 싶으면 Constraints Are Relative를 체크하면 됩니다.

각 축에 Constraints를 체크하지 않은 경우

 

각 축에 Constraints를 체크하지 않게 되면 위와 같이 Position 위치에 제약이 없기 때문에 자유롭게 이동됩니다.

X축 Constraints를 체크한 경우

 

 

마지막으로 Constraints Are Relative도 체크했고 모든 축에 Constraints를 체크한 후, X축에 위와 같이 설정하면 위 사진과 같이 움직일 수 있습니다.

세팅

 

OneGrabTranslateTransformer 컴포넌트를 사용하기 위해선 위와 같이 세팅을 해주어야 합니다.
(Hand) Grab Interactable같은 경우 기기에 따라 컴포넌트가 다릅니다.(핸드트래킹, 컨트롤러 기기)