728x90

게임개발 256

3D 충돌체크 모든 유형별 정리

3D 공간에서의 충돌 체크 유형과 개념 정리. 물체끼리의 충돌 유형들 Point in Sphere Point in AABB Point in OBB Point on Plane Closest Point on Plane Point on Line segment Point on Ray Closest Point on Ray Sphere to Sphere Sphere to AABB Sphere to OBB Sphere to Plane AABB to AABB AABB to OBB AABB to Plane OBB to OBB OBB to Plane Plane to Plane Point in Sphere P와 S의 중점 C간의 거리 D와 반지름 R길이 비교로 체크. 이 때, 연산 효율을 위해 반지름의 제곱과 비교해줄 수 ..

3D 기본 도형의 핵심 개념 간단 정리

게임 개발에서 3D 공간을 다룰 때 등장하는 기본 도형들에 대한 개념의 핵심만 간단히 정리 3D 기본 도형들 Point : 정점 Line : 선분 (끝이 있는) Ray : 직선 (끝이 없는) Sphere : 구 AABB (Axis Aligned Bounding Box) : 축 정렬 충돌 박스 OBB (Oriented Bounding Box) : 방향/회전 충돌 박스 Plane : 평면 Triangle : 삼각형 Point 3개의 좌표값을 갖는 점. Line 2개의 Point로 구성 Ray 1개의 Point와 방향 벡터(노멀 벡터) Sphere 1개의 Point 중점과 반지름(Radius) AABB (Axis Aligned Bounding Box) 1개의 Point 중점과 Size 크기 OBB (Orien..

[Unity] Inspector Custom Editor 에 추가 버튼, 삭제 버튼 추가

아래 이미지처럼 Inspector 에 요소를 추가하는 버튼과, 해당 요소 우측에 삭제하는 버튼을 커스텀하게 만들어 넣는 방법. OnInspectorGUI() 함수를 override 해서 아래 코드처럼 작성. base.OnInspectorGUI() 로 기본 요소들을 그리고 추가 요소들 작성. #if UNITY_EDITOR [CustomEditor(typeof(TrackSegment))] class TrackSegmentEditor : Editor { protected TrackSegment m_Segment; public void OnEnable() { m_Segment = target as TrackSegment; } public override void OnInspectorGUI() { base.OnI..

[Unity] Inspector 에 Addressable AssetReference 배열 노출시키기

아래 이미지의 PossibleObstacles 처럼, Asset Reference 를 연결할 수 있도록 Inspector 에 배열 노출시키려면? 아래처럼 코드 추가. public AssetReference[] possibleObstacles; 이 외에도 여러 타입으로 강제할 수 있음. Asset​Reference​Game​Object Asset​Reference​Label​Restriction Asset​Reference​Sprite Asset​Reference​T Asset​Reference​Texture Asset​Reference​Texture2D Asset​Reference​Texture3D AssetReference https://docs.unity3d.com/Packages/com.unity...

방탈출 게임(Escape Room) 관련 자료

방탈출 게임을 위한 퍼즐 아이디어 Top 15 Top 15 Puzzle Ideas for Escape Rooms https://escaperoomtips.com/design/escape-room-puzzle-ideas Top 15 Puzzle Ideas for Escape Rooms | Escape Room Tips These are the most common and flexible escape room puzzle ideas that we’ve seen in our experience doing 400+ escape rooms across the United States and Europe. These ideas are not specific to any particular theme or compa..

[Unity] ScriptableObject의 CustomEditor가 있을 때 저장이 안 되는 문제

특정 ScriptableObject 에 CustomEditor를 선언하고 작업할 때, ScriptableObject가 저장되지 않는 경우가 있음. CustomEditor를 정의하면 직접 적용도 해줘야 하기 때문에 그런데, 아래처럼 serializedObject.ApplyModifiedProperties(); 함수를 호출해주면 됨. [CustomEditor(typeof(MyScriptableObject))] public class MyScriptableObjectEditor : Editor { public override void OnInspectorGUI() { DrawPropertiesExcluding(serializedObject, new string[] { "m_Script" }); serializ..

유니티 에셋 스토어 블랙 프라이 데이 50%~최대 70% 할인!

2023년 블랙 프라이데이, 유니티 에셋 스토어에서 대규모 할인 세일이 진행 중입니다. 이번 세일 기간에는 인기 에셋 300개 이상이 최소 50% 할인부터 시작하여, 플래시 딜 시간 동안 최대 70%까지 할인됩니다. $100 짜리 에셋을 $30에 구매할 수 있는 기회도 제공됩니다. 음악 패키지, 3D 소품, 백경 에셋 패키지 등을 저렴한 가격에 구매 가능합니다. 할인 정보는 아래 스토어 링크에서 확인할 수 있습니다.https://prf.hn/click/camref:1011lvz7h/pubref:sale/destination:https%3A%2F%2Fassetstore.unity.com%2F%3Fon_sale%3Dtrue%26orderBy%3D1 에셋스토어여러분의 작업에 필요한 베스트 에셋을 찾아보세요. ..

[Blender] <나의 첫 블렌더> 책 블렌더 기본 조작 스터디 노트

스터디 정리 서적 https://link.coupang.com/a/bghBsM 나의 첫 블렌더:19개의 실전 예제를 따라하며 배우는 COUPANG www.coupang.com 블렌더 기본 조작 카메라 회전 : 미들버튼 드래그 카메라 Pan 이동 : Shift + 미들버튼 화면 분할 : 에디터 모서리 드래그 분할 에디터 뷰 확대 토글 : Ctrl + Space 쿼드 뷰 토글 : Ctrl + Alt + Q 툴바 토글 : T 사이드바 토글 : N 오브젝트 선택 관련 모두 선택 : A 선택 반전 : Ctrl + I 영역 선택 : B 원형 선택 : C (우클릭 취소) 툴바에서 선택하거나 W 키로 선택 방식 스위칭도 가능 기즈모 이동 : G (Grab) -> X, Y, Z 키로 각 축에 고정해서 이동 가능. 회전 ..

[Unity] 드로우 콜 최적화 (Optimize DrawCall) 요약 정리

[유니티 TIPS] 유니티 최적화를 위한 필수 기본기! Batching 방법 소개 https://www.youtube.com/watch?v=w14yjBlfNeQ 0. 여러 개 메시(mesh), 여러 개 머티리얼을 : 최적화 없음 1. 여러 개 메시, 단일 머티리얼에서 UV좌표 나눠쓰기 : Batches 는 그대로, SetPass call 최적화 2. 동적 배칭 (Dynamic Batching) : Batches, SetPass Call 최적화. 동일 머티리얼의 작은 메시들은 버텍스 버퍼를 재활용 처리. 저가형 기기에서 성능을 최적화하도록 설계. (900개 이상의 버텍스 속성과 300개 이상의 버텍스를 포함하는 메시에 동적 배칭을 적용할 수 없음. 문서 참조.) https://docs.unity3d.com..

[Unity] Unity Engine 버전업 후 에러 메시지 Error : "The type or namespace name 'Newtonsoft' could not be found"

Newtonsoft.Json.JsonConvert 를 사용하고 있었는데, 유니티 엔진(Unity Engine)버전업 후 아래와 같은 에러 메시지가 출력될 경우. "The type or namespace name 'Newtonsoft' could not be found ~ " Newtonsoft 모듈 종속성 설정이 추가되지 않았기 때문. 엔진 버전업 하면서 모듈 설정이 날아가는 모양. Packages/manifest.json 을 열어서 "dependencies" 아래에 모듈 정보를 추가해주면 됨. "com.unity.nuget.newtonsoft-json": "3.0.2" 이렇게. 저장하고 유니티 엔진 리프래쉬 한 번 해주면 끝. GitHub : Newtonsoft Json for Unity https:/..

728x90
반응형