Open topic with navigation
The vizact library also contains many single command actions. These actions are simply standard node3d commands which can be treated as actions. To create a single command action, simply add the node3d command after vizact.method. For instance, <node3d>.texture would become vizact.method.texture, <node3d>.visible would become vizact.method.visible, and so on. The arguments to these actions are exactly the same as the arguments to the regular commands.
Let's say you wanted to create an action that would toggle the visibility of an object every time the spacebar is pressed. You would simply create an action to wait for the space key and an action to toggle the visibility of a node, then you would add these actions to an action sequence which repeats forever:
In the code above, the visible command is called once when the action sequence executes. With some node commands it's possible to create custom animations with repeated calls. For example, the thickness of 3D text can be modified using the text3D.setThickness command. Calling this command every frame with increasing values will result in text that grows in size. To create this animated action we can use the vizact.mix command.
First, a 3D text node and mix object are added. For the mix object a start value (0.1), end value (1.0), and duration (1 second) are specified:
Next, the mix object is passed to setThickness to create the action:
Now, when the action is applied to the text object the setThickness command will execute every frame until the mix conditions are complete:
Action synchronization and management
Creating your own actions
Actions command table
Tutorial: Using actions
Animation path basics