# SAudioReactiveTransform

## Index

### Properties Index

| Property Name                                       |
| --------------------------------------------------- |
| bool [**Enabled** ](#enabled)`get` `set`            |
| SGameObject [**Target** ](#target)`get` `set`       |
| bool [**Position** ](#position)`get` `set`          |
| SVector [**MinPosition** ](#minposition)`get` `set` |
| SVector [**MaxPosition** ](#maxposition)`get` `set` |
| bool [**Rotation** ](#rotation)`get` `set`          |
| SVector [**MinRotation** ](#minrotation)`get` `set` |
| SVector [**MaxRotation** ](#maxrotation)`get` `set` |
| bool [**Scale** ](#scale)`get` `set`                |
| SVector [**MinScale** ](#minscale)`get` `set`       |
| SVector [**MaxScale** ](#maxscale)`get` `set`       |

## Properties

### Enabled

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

*Whether the Audio Reactive Transform component is enabled or not.*

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

```lua
Space.Host.ExecutingObject.AudioReactiveTransform.Enabled= false
```

{% endtab %}
{% endtabs %}

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

```lua
--clicking this object will Enable/Disable it's Audio Reactive Transform component
thisGameObject = Space.Host.ExecutingObject
component = thisGameObject.AudioReactiveTransform


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


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

{% endtab %}
{% endtabs %}

### Target

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

*The target GameObject which will be affected by the Audio Reactive Transform.*

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

```lua
target = Space.Host.ExecutingObject.AudioReactiveTransform.Target
```

{% endtab %}
{% endtabs %}

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

```lua
--clicking this object will toggle between two different Audio Reactive Transform targets
thisObject = Space.Host.ExecutingObject
target1 = Space.Host.GetReference("theTarget1") --add this reference to Scripting Runtime component
target2 = Space.Host.GetReference("theTarget2") --add this reference to Scripting Runtime component

function OnClickFunction()
  if thisObject.AudioReactiveTransform.Target == target1 then
    thisObject.AudioReactiveTransform.Target = target2
  else
    thisObject.AudioReactiveTransform.Target = target1
  end
end

thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
```

{% endtab %}
{% endtabs %}

### Position

bool **Position** `get` `set`

*Whether or not the target's position will be affected by the Audio Reactive Transform.*

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

```lua
Space.Host.ExecutingObject.AudioReactiveTransform.Position = true
```

{% endtab %}
{% endtabs %}

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

```lua
--clicking this object will toggle it's Audio Reactive Transform Position property 
thisObject = Space.Host.ExecutingObject

function OnClickFunction()
   thisObject.AudioReactiveTransform.Position = not thisObject.AudioReactiveTransform.Position
end

thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
```

{% endtab %}
{% endtabs %}

### MinPosition

[SVector](https://docs.sine.space/scripting/client-scripting-api-reference/types/svector) **MinPosition** `get` `set`

*Returns MinPosition value of the Audio Reactive Transform.*

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

```lua
Space.Host.ExecutingObject.AudioReactiveTransform.MinPosition = Vector.New(0,1,0)
```

{% endtab %}
{% endtabs %}

### MaxPosition

[SVector](https://docs.sine.space/scripting/client-scripting-api-reference/types/svector) **MaxPosition** `get` `set`

*Returns MaxPosition value of the Audio Reactive Transform.*

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

```lua
Space.Host.ExecutingObject.AudioReactiveTransform.MaxPosition = Vector.New(1,2,1)
```

{% endtab %}
{% endtabs %}

### Rotation

bool **Rotation** `get` `set`

*Whether or not the target's rotation will be affected by the Audio Reactive Transform.*

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

```lua
Space.Host.ExecutingObject.AudioReactiveTransform.Rotation= true
```

{% endtab %}
{% endtabs %}

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

```lua
--clicking this object will toggle it's Audio Reactive Transform Rotation property 
thisObject = Space.Host.ExecutingObject

function OnClickFunction()
   thisObject.AudioReactiveTransform.Rotation= not thisObject.AudioReactiveTransform.Rotation
end

thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
```

{% endtab %}
{% endtabs %}

### MinRotation

[SVector](https://docs.sine.space/scripting/client-scripting-api-reference/types/svector) **MinRotation** `get` `set`

*Returns MinRotation value of the Audio Reactive Transform.*

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

```lua
Space.Host.ExecutingObject.AudioReactiveTransform.MinRotation = Vector.New(0,30,0)
```

{% endtab %}
{% endtabs %}

### MaxRotation

[SVector](https://docs.sine.space/scripting/client-scripting-api-reference/types/svector) **MaxRotation** `get` `set`

*Returns MaxRotation value of the Audio Reactive Transform.*

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

```lua
Space.Host.ExecutingObject.AudioReactiveTransform.MinRotation = Vector.New(0,60,0)
```

{% endtab %}
{% endtabs %}

### Scale

bool **Scale** `get` `set`

*Whether or not the target's scale will be affected by the Audio Reactive Transform.*

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

```lua
Space.Host.ExecutingObject.AudioReactiveTransform.Scale= true
```

{% endtab %}
{% endtabs %}

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

```lua
--clicking this object will toggle it's Audio Reactive Transform Scale property 
thisObject = Space.Host.ExecutingObject

function OnClickFunction()
   thisObject.AudioReactiveTransform.Scale= not thisObject.AudioReactiveTransform.Scale
end

thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
```

{% endtab %}
{% endtabs %}

### MinScale

[SVector](https://docs.sine.space/scripting/client-scripting-api-reference/types/svector) **MinScale** `get` `set`

*Returns MinScale value of the Audio Reactive Transform.*

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

```lua
Space.Host.ExecutingObject.AudioReactiveTransform.MinScale = Vector.New(1,1,1)
```

{% endtab %}
{% endtabs %}

### MaxScale

[SVector](https://docs.sine.space/scripting/client-scripting-api-reference/types/svector) **MaxScale** `get` `set`

*Returns MaxScale value of the Audio Reactive Transform.*

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

```lua
Space.Host.ExecutingObject.AudioReactiveTransform.MaxScale = Vector.New(2,2,2)
```

{% endtab %}
{% endtabs %}

### GameObject

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

*Returns a reference to the GameObject of this component.*

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

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

{% endtab %}
{% endtabs %}
