## Example Files¶

Rigid Body and Actor Body interaction solely relying on collision

\$NUMERIONCARBONMY2022_PATH/documentation/_downloads/example_machinery.mb

Scripted “Spawning” Rigid Bodies

This example shows how to “spawn” a large number of Carbon Rigids + bodies by keyframing their Activation parameter. Note that every Carbon node must be spawned on the first Simulation frame so it can be added to the Simulation. If you try to dynamically create nodes and add them on the fly, the Simulation will reset.

This approach of keyframing the Activation parameter has two major upsides:

• You can spawn multiple RBs all at the same location; you just need to make sure that the previous one has fallen enough under gravity before you activate a new one; so that they do not overlap when the new one gets spawned. This means that you don’t have to for example spawn them along the y axis, which usually leads to a long “queue” and by the time the top ones have reached their destination, their speed is so high that you require a ridiculously large amount of subdivisions to prevent collision issues.
• You only have Carbon Rigids and Carbon Bodies activated/simulating that are currently contributing, i.e. the solver doesn’t have to perform “unnecessary” calculations for RBs somewhere high up the y axis.