--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)
Position
bool Positiongetset
Whether or not the target's position will be affected by the Audio Reactive Transform.
--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)
--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)
--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)