Variable Control Action
Variable Control Action allows you to control the interaction of dynamic variables in the scene.
Learn more about
How to use Variable Control Action
When an Event is performed, a dynamic variable can be controlled with the following interaction types: Play
, Pause
, Stop
, Restart
, or Toggle - Ping Pong
along with a delay value.
Here is a simple how-to example of interacting with the dynamic variable via a mouse click.
Video demonstrating how to use Variable Control Action with Dynamic Counter Variable.
In a new scene, create a cube and a dynamic variable of type
Counter
from the Variable panel.Set the Interval value to β0.001β to make the counter grow faster.
Select the cube and assign the counter variable to the X position of the cube.
Add an event in the right sidebar in the events section by clicking the β+β icon.
Change the event type in the top dropdown to βMouse Downβ.
Add an action βVariable Controlβ and expand it by clicking on the β>β icon.
Click on the dropdown in the Variable Control Action and select the variable to be controlled β the
Counter
for this example.Enter Play mode and click on the cube to see it moving along the X axis over time.
Events supporting Variable Control Action
The following Events have access to Variable Control Action.
Variable Control Action properties
Select Dynamic Variable
Select the dynamic variable to be updated via the Variable Control Action. The dropdown list will access any dynamic variables that are available in the current file.
Interaction
Set the type of interaction that should occur when an event is performed.
Play β Plays the dynamic variable.
Pause β Pauses the dynamic variable.
Play/Pause β On event trigger, plays or pauses the dynamic variable based on the current state.
Stop β Stops the running dynamic variable.
Restart β Restarts the dynamic variable.
Toggle - Ping Pong β Reverses the dynamic variable.
Delay
Adds a delay to the interaction of the Variable Control Action to take place.
Restart and Toggle interactions are only available for Counter Dynamic Variable.