Using Behavior Scripts
Qt 3D Studio supports using behavior scripts. Included in Studio is a set of behavior scripts. These can be found in the scripts asset library.
It is possible to write new behavior scripts and use them in Studio.
Behavior scripts can be applied to objects to give the specific object a certain behavior. Behavior properties can be edited in the inspector palette.
This is an example on how to add a behavior and use it in your project. In this example we are using the CopyTransform behavior.
- From the project palette, open the behavior library. Then select the
CopyTransform.qmlfile from the file dialog to import it to your project.
- Add two cubes to the scene by dragging and dropping from the basic objects palette.
- Move the cubes away from each other.
- Animate the position of one of the cubes.
- Drag the
CopyTransformscript from the project palette to the cube (in the scene graph) that has no animation. The
CopyTransformscript appears as a child object to the Cube.
- Select the
CopyTransformscript in the scene graph and set the properties in the inspector palette:
- Copy Target: The cube with the animation
- Additive mode: True
- Position: True
- Start Immediately: True
- Preview the presentation in the Viewer to see the result.
Available under certain Qt licenses.
Find out more.