Version:

# Using Parameters to Adjust the Animation During Runtime

You can adjust the SimulatedObject node to change its animation during runtime. To do so, create a Parameter node and attach them to the node in the anim graph. If you don’t, the SimulatedObject node uses the properties that you entered in the Attributes panel.

To adjust the animation during runtime

1. In the Parameters panel, click the + icon and choose Add parameter.

2. Enter the following values:

• For Value type, select the Float (slider).
• For Name, enter Stiffness.
• For Default, enter 1.0.
• For Minimum to 1.0.
• For Maximum, enter 100.

Your parameter should look like the following.

3. Click Create.

4. Repeat Steps 2 and 3 but change Name to Gravity, Default to 1.0, Minimum to 0 and Maximum to 5.

5. Repeat Steps 2 and 3 but change Name to Damping, Default to 1.0, Minimum to 1 and Maximum to 100.

6. Repeat Steps 2 and 3 but change Name to Weight, Default to 1, Minimum to 0 and Maximum to 1`.

Your parameters should look like the following.

7. In the Anim Graph grid, right-click and choose Create Node, Sources, Parameters.

8. On the Parameters0 node, connect the Stiffness output to the Stiffness factor, the Gravity output to the Gravity factor, and so on.

Your graph should look like the following.

9. Pay the anim graph and adjust the sliders for the Parameters to view your changes.

Note

The simulated object, simulated joints, and parameters on the anim graph share the following properties: Stiffness, Gravity, Damping. When you adjust the properties, the Animation Editor calculates the results of these properties using the following:

• Stiffness factor parameter * simulated object stiffness * simulated joint stiffness
• Gravity factor parameter * simulated object gravity * simulated joint gravity
• Damping factor parameter * simulated object damping * simulated joint damping