본문 바로가기

{Programing}/Game Engine9

unity - lighting Point Light : 3차원 공간의 한점에 존재하는 광원, 모든 방향으로 빛을 균일하게 조사함. 광원과의 거리에 따라 빛의 강도가 달라짐. 점에서 최대 거리에서는 빛 세기가 0이됨. Spot Light : Point Light와 기본적으로 같으나 일정 각도 이내에서만 빛을 조사함. Directional Light : 태양같은 거리 무한의 방향만 가지는 빛을 나타냄. 씬의 아무 위치에나 두면 됨. 해, 달이 뜨고 지는것을 표현하는데에 사용할수 있음. Area Light : 면 광원이라고 함. 사각형, 디스크형으로 정의 가능. 실시간으로는 활용할수 없고 라이트맵으로 베이크 해야 사용 가능. 광원 모드 1. Realtime : 실시간 광원 모드로 런타임에 프레임단위로 광원 계산을 진행함. 깜빡이는 전구, .. 2023. 3. 6.
unity - transform 하나의 Object 의 위치, 회전, 크기 속성을 가지는 component. Scene에 존재하는 모든 Object(UI포함)는 전부 tranform을 가짐. transform은 부모를 가질수 있고, 위치,회전,크기는 계단식으로 적용된다. transform.localPosition : 현재 object 의 부모 transform 에 연관되는 transform의 position transform.position : 월드 좌표에서의 transform 의 position position -> localposition 의 변환은 InverseTransformPoint localposition -> position 의 변환은 TransformPoint local~~ 는 항상 부모 object 에 연관된 속성이라고.. 2021. 5. 17.
unity - key input 관련 내용 docs.unity3d.com/ScriptReference/Input.html Unity - Scripting API: Input Use this class to read the axes set up in the Conventional Game Input, and to access multi-touch/accelerometer data on mobile devices. To read an axis use Input.GetAxis with one of the following default axes: "Horizontal" and "Vertical" are mapped to joyst docs.unity3d.com 키 입력 getkey~~ : 인수로 keycode 를 전달. 여기에 자세한 keycode 가.. 2021. 5. 12.
Unity - 모바일 해상도 고정 대응. Screen.SetResolution( width, Height, fullscreen) 으로 픽셀 해상도 고정 가능. 풀스크린 모드의 차이는 true 일때 화면 아래에 나오는 뒤로가기 홈버튼 이 나오지 않고 false일 때는 표시함. void ResolutionFix() { float targetWidthAps = 16.0f; float targetHeightAps = 9.0f; Camera.main.aspect = targetWidthAps / targetHeightAps; float widthRatio = (float)Screen.width / targetWidthAps; float heightRatio = (float)Screen.height / targetHeightAps; float widtha.. 2020. 6. 12.