▣ 설명
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
'[ Unity ] > - 유니티 실습' 카테고리의 다른 글
유니티 2D 배경 스크롤링 (1) | 2024.09.12 |
---|---|
유니티 코루틴 (3) | 2024.09.12 |
유니티 2D Object Ping Pong (0) | 2024.09.11 |
유니티 2D 점프, 더블점프 (7) | 2024.09.10 |
유니티 쿼터니언(Quaternion)과 회전 (3) | 2024.09.09 |
댓글