Saving Constrained Objects

Even though a constrained object may pick another physics objects as its target, there is not parent-child relationship between them. If you want to save the constrained object and the relation, then you need to integrate them as a entity before save them to the custom library.

  1. Apply several parts of a structure. In this case, the body, the neck and the head of the toy dog.
  2. Assemble these parts by transforming them.
  3. Individually apply constraints (in this case, the Spring constraints) to the head and the neck. Please refer to The Basic Workflow of Using Constraint section for more information.
  4. pick the body as the neck's target, while pick the neck as the head's target.

    Pick the neck as target for the head constraint.

    Pick the body as target for the neck constraint.

  5. Simulate to view the result.
  6. Although the parts have connecting relations, the parent-child hierarchy of them does not exist, which means they are at the same level in the Scene Manager.
  7. If you select the body and save it to the library, only the body will be saved and the constraint relationships will be broken.
  8. To save the entire physics structure, you need to attach all the components to a parent. In this case, the body.

  9. Save the prop by clicking the Add button under the Content Manager. The entire physics structure can then be saved and re-used from the content library.