Skip to content

BoxColliderComponent

29thnight edited this page Nov 27, 2025 · 1 revision

BoxColliderComponent

간단 설명: 축 정렬 박스(Extents) 형태의 물리 콜라이더 컴포넌트. 충돌/트리거 이벤트와 마찰/반발/밀도 물리 속성을 제공.

생성/소멸 라이프사이클

메서드 설명
생성자 기본 Extent(1,1,1) 및 타입 초기화(COLLISION)
Awake() 씬에 자신을 등록하고 Extent 동기화
OnDestroy() 씬에서 등록 해제

주요 물리 설정 메서드

메서드 설명
GetExtents() 현재 박스 크기 반환(Info 동기화 수행)
SetExtents(extents) 박스 크기 설정 및 내부 Info 업데이트
GetBoxInfo() 최종 ColliderInfo 구성 후 반환(레이어/마찰/밀도 포함)
SetBoxInfoMation(info) 외부에서 전체 Info 복원
GetStaticFriction()/SetStaticFriction(f) 정마찰 계수 조회/설정
GetDynamicFriction()/SetDynamicFriction(f) 동마찰 계수 조회/설정
GetRestitution()/SetRestitution(r) 반발 계수 조회/설정
GetDensity()/SetDensity(d) 밀도 조회/설정
GetColliderType()/SetColliderType(type) 콜라이더 타입(COLLISION/QUERY 등)

Transform 오프셋

메서드 설명
SetPositionOffset(pos) 로컬 위치 오프셋 설정
GetPositionOffset() 위치 오프셋 반환
SetRotationOffset(quat) 로컬 회전 오프셋 설정
GetRotationOffset() 회전 오프셋 반환

이벤트 콜백(ICollider 오버라이드)

메서드 설명
OnTriggerEnter(other) 트리거 진입 감지/카운트 증가
OnTriggerStay(other) 트리거 지속(사용자 처리 지점)
OnTriggerExit(other) 트리거 종료 감지/카운트 감소
OnCollisionEnter(other) 충돌 시작 감지/카운트 증가
OnCollisionStay(other) 충돌 지속(사용자 처리 지점)
OnCollisionExit(other) 충돌 종료 감지/카운트 감소

프로퍼티 / 필드

필드 설명
m_boxExtent 사용자 설정 박스 크기(Vector3)
m_posOffset 위치 오프셋
m_rotOffset 회전 오프셋(Quaternion)
staticFriction 정마찰
dynamicFriction 동마찰
restitution 반발 계수
density 밀도
m_Info 내부 BoxColliderInfo(물리엔진 전달 구조)
m_type 콜라이더 모드(Trigger/Collision 등)
m_collsionCount 현재 충돌/트리거 카운트(디버그용)

CreatorEngine

API Docs

API Reference
Main
PhysicsSystem
RenderEngine
ScriptBinder
Utility_Framework

etc

Clone this wiki locally