# SVirtualCamera

## Index

### Properties Index

| Property Name                                               |
| ----------------------------------------------------------- |
| bool [**Enabled** ](#enabled)`get` `set`                    |
| float [**FieldOfView** ](#fieldofview)`get` `set`           |
| float [**Dutch** ](#dutch)`get` `set`                       |
| float [**NearClip** ](#nearclip)`get` `set`                 |
| float [**FarClip** ](#farclip)`get` `set`                   |
| float [**OrthographicSize** ](#orthographicsize)`get` `set` |
| int [**Priority** ](#priority)`get` `set`                   |
| SGameObject [**Follow** ](#follow)`get` `set`               |
| SGameObject [**LookAt** ](#lookat)`get` `set`               |
| SGameObject [**GameObject** ](#gameobject)`get`             |

## Properties

### Enabled

bool **Enabled** `get` `set`

*Is this virtual camera enabled?*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.VirtualCamera.Enabled = true
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--clicking this object will Enable/Disable it's Virtual Camera component
thisGameObject = Space.Host.ExecutingObject
component = thisGameObject.VirtualCamera

OnClick = function()
component.Enabled =  not component.Enabled
end


thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
```

{% endtab %}
{% endtabs %}

### FieldOfView

float **FieldOfView** `get` `set`

*Field of view of this virtual camera.*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.VirtualCamera.FieldOfView = 50.0
```

{% endtab %}
{% endtabs %}

### Dutch

float **Dutch** `get` `set`

*Dutch of view of this virtual camera. In degrees.*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.VirtualCamera.Dutch = 50.0
```

{% endtab %}
{% endtabs %}

### NearClip

float **NearClip** `get` `set`

*The near clip plane of this virtual camera.*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.VirtualCamera.NearClip = 50.0
```

{% endtab %}
{% endtabs %}

### FarClip

float **FarClip** `get` `set`

*The far clip plane of this virtual camera.*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.VirtualCamera.FarClip = 50.0
```

{% endtab %}
{% endtabs %}

### OrthographicSize

float **OrthographicSize** `get` `set`

*The orthographic size of this virtual camera.*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.VirtualCamera.OrthographicSize = 10.0
```

{% endtab %}
{% endtabs %}

### Priority

int **Priority** `get` `set`

*The priority of this virtual camera. Higher priority cameras will be used over lower priority cameras when conflicted.*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.VirtualCamera.Priority = 500
```

{% endtab %}
{% endtabs %}

### Follow

[SGameObject](https://docs.sine.space/scripting/client-scripting-api-reference/types/sgameobject) **Follow** `get` `set`

*The object that this virtual camera should be following.*

{% tabs %}
{% tab title="Lua" %}

```lua
AReferenceToGameObject = Space.Host.GetReference("Reference Name")
Space.Host.ExecutingObject.VirtualCamera.Follow = AReferenceToGameObject
```

{% endtab %}
{% endtabs %}

### LookAt

[SGameObject](https://docs.sine.space/scripting/client-scripting-api-reference/types/sgameobject) **LookAt** `get` `set`

*The object that this virtual camera should be looking at.*

{% tabs %}
{% tab title="Lua" %}

```lua
AReferenceToGameObject = Space.Host.GetReference("Reference Name")
Space.Host.ExecutingObject.VirtualCamera.LookAt = AReferenceToGameObject
```

{% endtab %}
{% endtabs %}

### GameObject

[SGameObject](https://docs.sine.space/scripting/client-scripting-api-reference/types/sgameobject) **GameObject** `get`

*Property Description*

{% tabs %}
{% tab title="Lua" %}

```lua
theGameObject = Space.Host.ExecutingObject.VirtualCamera.GameObject
```

{% endtab %}
{% endtabs %}
