유니티 콜리전 범위 시각화
▣ 설명
BoxCollider2D 컴포넌트의 콜리전 영역을 씬 뷰에서 그리기 위해 OnDrawGizmos()를 사용합니다.
Gizmos.DrawWireCube()는 Wireframe 형태의 박스를 그려줍니다.
boxCollider.offset과 boxCollider.size를 사용하여 콜리전 박스의 정확한 위치와 크기를 설정합니다.
▣ 설명
BoxCollider 컴포넌트의 콜리전 영역을 씬 뷰에서 시각적으로 확인할 수 있게 합니다.
Gizmos.DrawWireCube()는 3D 박스 형태의 콜리전 영역을 그립니다.
boxCollider.center와 boxCollider.size를 사용하여 콜리전 박스의 위치와 크기를 정확히 설정합니다.
https://docs.unity3d.com/ScriptReference/BoxCollider2D.html
Unity - Scripting API: BoxCollider2D
Success! Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable. Close
docs.unity3d.com
https://docs.unity3d.com/ScriptReference/Gizmos.DrawWireCube.html
Unity - Scripting API: Gizmos.DrawWireCube
Success! Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable. Close
docs.unity3d.com
https://docs.unity3d.com/ScriptReference/BoxCollider.html
Unity - Scripting API: BoxCollider
Success! Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable. Close
docs.unity3d.com