# Camera

**Camera:**

`Camera.GetPosition()`: Retrieves the current position of the camera, returning it as a `Vector3`.

```lua
local pos = Camera.GetPosition()
print(pos.x, pos.y, pos.z)
```

`Camera.SetPosition(Vector3)`: Allows you to manually override the camera's location by passing a new `Vector3` coordinate.

```lua
Camera.SetPosition(Vector3(0, 100, 0))
```

`Camera.GetRotation()`: Retrieves the current orientation of the camera, returning it as a `Matrix3`.

```lua
local rot = Camera.GetRotation()
```

`Camera.SetRotation(matrix)`: Sets the camera's orientation by passing a `Matrix3`.

```lua
local rot = Camera.GetRotation()
Camera.SetRotation(rot)
```

`Camera.Spectate(humanoid)`: Makes the camera spectate the given Humanoid.

```lua
Camera.Spectate(someHumanoid)
```

`Camera.GetSubject()`: Returns the current camera subject as an Instance.

```lua
local subject = Camera.GetSubject()
print(subject:Name())
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yerba-1.gitbook.io/yerba-docs/api/markdown.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
