> For the complete documentation index, see [llms.txt](https://ditoland-utplus.gitbook.io/ditoland/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/cameraclient.md).

# CameraClient

## CameraClient

클라이언트에서 사용되는 카메라 개체에요.

### **속성**

<br>

| **Track** |
| --------- |

Track 관련 객체를 얻을수 있어요. LINK : [Track](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/track)

\-- 샘플 --

```lua
cube.Track:AddLocalMove("Move", movePos, moveSpeed, false) --이동 트랙을 등록해요. (이동 트랙은 여러개도 등록할 수 있어요.)
cube.Track:PlayTransformTrack("Move", Enum.TransformPlayType.Repeat, InfinityPlay)
```

<br>

| **FieldOfView** |
| --------------- |

FieldOfView를 얻을 수 있어요.

\-- 샘플 --

```lua
local camera = LocalPlayer:GetCurrentCamera()
camera.FieldOfView = 50
```

<br>

| **bCollisionWithCam** |
| --------------------- |

(deprecated) 카메라 CollisionTest를 켤 수 있어요.

<br>

| **CollisionWithCam** |
| -------------------- |

카메라 CollisionTest를 켤 수 있어요.

\-- 샘플 --

```lua
local camera = LocalPlayer:GetCurrentCamera()
camera.CollisionWithCam = true
```

<br>

| **bEnableCameraLag** |
| -------------------- |

(deprecated)카메라 지연 효과를 켤 수 있어요.

<br>

| **EnableCameraLag** |
| ------------------- |

카메라 지연 효과를 켤 수 있어요.

\-- 샘플 --

```lua
local camera = LocalPlayer:GetCurrentCamera()
camera.EnableCameraLag = true
camera.CameraLagSpeed = 5
```

<br>

| **CameraLagSpeed** |
| ------------------ |

카메라 지연 속도를 얻을 수 있어요.

\-- 샘플 --

```lua
local camera = LocalPlayer:GetCurrentCamera()
camera.bEnableCameraLag = true
camera.CameraLagSpeed = 5
```

<br>

| **SocketOffset** |
| ---------------- |

카메라 위치 Offset을 얻을 수 있어요.

\-- 샘플 --

```lua
local camera = LocalPlayer:GetCurrentCamera()
camera.SocketOffset = Vector.new(0, 0, 90)
```

<br>

| **Zoom** |
| -------- |

Zoom 값을 얻을 수 있어요.\
Zoom 값 변경시 카메라의 줌 최소 &최대값을 무시해요.

\-- 샘플 --

```lua
local camera = LocalPlayer:GetCurrentCamera()
camera.Zoom = 30
```

<br>

| **ZoomMin** |
| ----------- |

Zoom의 최소 값을 얻을 수 있어요.

\-- 샘플 --

```lua
local camera = LocalPlayer:GetCurrentCamera()
camera.ZoomMin = 20
```

<br>

| **ZoomMax** |
| ----------- |

Zoom의 최대 값을 얻을 수 있어요.

\-- 샘플 --

```lua
local camera = LocalPlayer:GetCurrentCamera()
camera.ZoomMax = 40
```

<br>

| **bInheritPitch** |
| ----------------- |

(deprecated) DesiredRot 연산 시 Inherit Pitch 사용 여부

<br>

| **InheritPitch** |
| ---------------- |

DesiredRot 연산 시 Inherit Pitch 사용 여부

<br>

| **bInheritYaw** |
| --------------- |

(deprecated) DesiredRot 연산 시 Inherit Yaw 사용 여부

<br>

| **InheritYaw** |
| -------------- |

DesiredRot 연산 시 Inherit Yaw 사용 여부

<br>

| **bInheritRoll** |
| ---------------- |

(deprecated) DesiredRot 연산 시 Inherit Roll 사용 여부

<br>

| **InheritRoll** |
| --------------- |

DesiredRot 연산 시 Inherit Roll 사용 여부

<br>

| **bUsePreviousRotWhenNotUsingInheritRot** |
| ----------------------------------------- |

(deprecated) DesiredRot 연산 시 Inherit Rotation을 사용하지 않을 경우 Previous Rotation / RelativeRotation을 사용할 지 여부

<br>

| **UsePreviousRotWhenNotUsingInheritRot** |
| ---------------------------------------- |

DesiredRot 연산 시 Inherit Rotation을 사용하지 않을 경우 Previous Rotation / RelativeRotation을 사용할 지 여부

### **함수**

<br>

| **void SetLookAtTarget(Object TargetObject)** |
| --------------------------------------------- |

대상 오브젝트를 타겟으로 설정해서 바라봐요. (타겟으로 설정할 오브젝트)

\-- 샘플 --

```lua
local camera = LocalPlayer:GetCurrentCamera()
camera:SetLookAtTarget(Workspace.SpawnPoint) --카메라가 대상 오브젝트를 바라보게 해요. (nil이면 바라보지 않아요.)
```

<br>

| **void ZoomInOut(number Value)** |
| -------------------------------- |

카메라의 줌을 설정할 수 있어요. (설정할 카메라 줌 크기 값)\
Zoom 값 변경시 카메라의 줌 최소 &최대값을 넘을 수 없어요.

\-- 샘플 --

```lua
local camera = LocalPlayer:GetCurrentCamera()
camera:ZoomInOut(0.5) --카메라의 확대축소값을 조절해요.
```

\ <br>

## **사용 가능한 부모 오브젝트 기능들**

### **속성**

| **이름**                                                                                             | **설명**                  |
| -------------------------------------------------------------------------------------------------- | ----------------------- |
| [**Enable**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)         | **객체 활성화 여부**           |
| [**Transform**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)      | **객체의 Matrix**          |
| [**LocalTransform**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject) | **객체의 Local Transform** |
| [**Location**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)       | **객체의 위치 Vector**       |
| [**LocalLocation**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)  | **객체의 로컬좌표 Vector**     |
| [**Rotation**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)       | **객체의 회전 Vector**       |
| [**LocalRotation**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)  | **객체의 로컬 회전 Vector**    |
| [**Scale**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)          | **객체의 크기 Vector**       |
| [**Visible**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)        | **객체의 가시성**             |

### **이벤트**

| **이름**                                                                                             | **설명**                                                                                                                       |
| -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| [**OnUpdateEvent**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)  | <p><strong>생성 후 매 프레임마다 호출되는 이벤트에요.</strong><br><strong>연결함수 형식은 function(updateTime), updateTime 은 number 입니다.</strong></p> |
| [**OnDestroyEvent**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject) | <p><strong>삭제될 때 호출되는 이벤트에요.</strong><br><strong>연결함수 형식은 function() 입니다.</strong></p>                                       |
| [**OnEnableEvent**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)  | <p><strong>Enable 될때 호출되는 이벤트에요.</strong><br><strong>연결함수 형식은 function() 입니다.</strong></p>                                   |
| [**OnDisableEvent**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject) | <p><strong>Disable 될때 호출되는 이벤트에요.</strong><br><strong>연결함수 형식은 function() 입니다.</strong></p>                                  |

### **함수**

| **이름**                                                                                                                  | **설명**                                                                                        |
| ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| [**GetKey**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)                              | **객체의 키 값을 얻을 수 있어요.**                                                                        |
| [**SetTransformWithCollisionCheck**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)      | **현재 매트릭스에서 설정 된 매트릭스로 보간이 되는 매트릭스를 설정할 수 있어요 설정할 수 있어요. (Matrix 값, bool 충돌 처리 여부)**          |
| [**SetLocalTransformWithCollisionCheck**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject) | **현재 매트릭스에서 설정 된 매트릭스로 보간이 되는 매트릭스를 로컬좌표기준으로 설정할 수 있어요 설정할 수 있어요. (Matrix 값, bool 충돌 처리 여부)** |
| [**Teleport**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)                            | **순간이동 하는 매트릭스를 설정할 수 있어요. (Matrix 값)**                                                       |
| [**SetLocationWithCollisionCheck**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)       | **객체의 위치를 설정할 수 있어요. (설정할 위치 Vector 값, 충돌 처리 여부)**                                            |
| [**SetTag**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)                              | **객체의 tag를 설정해요. (설정할 tag)**                                                                  |
| [**GetTag**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)                              | **객체에 설정된 tag를 얻을 수 있어요.**                                                                    |
| [**ConnectEventFunction**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)                | **유저가 추가한 오브젝트 커스텀 이벤트에 함수를 연결할 수 있어요. (이벤트 이름, 연결 함수)**                                      |
| [**LookAt**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/worldobject)                              | **오브젝트가 해당하는 위치를 바라보게 할 수 있어요. (바라볼 위치 Vector)**                                              |
