Blog | Restraining Objects

In Virtual CRASH 3 and 4, it’s possible to restrain the motion of objects by strategically using joints or the rope tool. In this post we’ll review different ways objects can be restrained, including multibodies.

In the simple example below, a sphere is attached to a box. The box is a terrain object and therefore cannot move. A spherical joint is used to connect the sphere to the box. Even though the sphere is given an initial velocity, the sphere’s motion is restrained by the joint connection. Remember, you can learn more about using joints in this post:

It is highly recommend to read this post before continuing.

Spherical joints can be used to easily restrain the motion of multibodies. First, convert the multibody to a rigid body (see Now, simply attach a spherical joint to the multibody’s torso. In the below example, we’ve simulated the effect of a safety harness by attaching a spherical joint to the torso and to an immovable object. This prevents the multibody from falling to the ground.

Let’s return to our simple box and ball simulation. Turn off the simulator to make it easier to attach the rope tool. To select the rope tool, simply left-click on “joints”, left-click on “create rope”, left-click on the first object, then right-click on the second object. The two objects will then be connected. Notice in the video, we expand the “joints” menu of the rope tool to access the spring stiffness and damping values for the rope. The rope is constructed of an array of rigid body spheres connected by spherical joints. The spherical joint spring stiffness and damping coefficients can be easily modified to create the desired amount of elasticity. You can easily change the mass per unit in the rope by left-clicking on the rope object in the left-side control panel labeled “chain” and then by left-clicking on “mass properties”. The total weight for the rope tool will be divided among the individual spheres that compose it.

Remember, for any joint in Virtual CRASH, including multibody ragdoll joints as well as spherical joints used by the rope tool, the spring stiffness and damping coefficients are re-scaled internally such that:

$$ k_{internal} = {m_{1}+m_{2} \over 1~kg} \cdot k_{user~input} $$


$$ b_{internal} = {m_{1}+m_{2} \over 1~kg} \cdot b_{user~input} $$

where \(m_{1}\) and \(m_{2}\) are the masses of the connected objects. This conversion helps ensure simulations remain stable for increases in linked object masses.

Note: If one of the connected objects is infinite in mass (using Physics > Make Unyielding / Terrain from Selection), then the internally used spring constant is:

$$k_{internal} = {m \over 1~kg} \cdot k_{user~input}$$


$$b_{internal} = {m \over 1~kg} \cdot b_{user~input}$$

where \(m\) is the mass of the finite mass rigid body object.

You can learn more about the various spring and damping input values used by joints in the Short Glossary:

When a rope is created, a default spring and damping value are used for the “fix orientation” property of the joints within the rope (see Short Glossary). These inputs will essentially control the torque resistance to “bending” — that is, the resistance of each joint’s change in articulation angle. As the spring and damping values are increased, you will notice the rope’s overall resistance to bending also increase. Note that neighboring spheres will not directly interact because of the “disable before break” option being enabled in the “contact” menu for the rope’s joints; however, non-neighboring joints can interact. You can also re-enable neighboring joint interactions if desired by deselecting this feature.

Wrapping objects with a rope

In the above example, each end of the rope is attached to the connected objects. We can also restrain objects by wrapping the rope tool around them. This takes practice. In the video below, we’ll use two ropes to restrain the forward motion of a rigid body cylinder. Note, after you’ve selected the rope tool, the first left-click will attach the starting end of the rope to the object your mouse is hovering over. As you left-click on additional objects, new lengths of rope will be created that link the prior point and the current point you left-click on, but the rope will not be attached to these additional points. The end of the rope will be attached to the final object you right-click on. The video below shows the cylinder shape itself being used to help shape the rope. After each rope is created, the cylinder can be repositioned as needed, but the ropes’ shapes remain in their initial configuration until the simulation starts. As the cylinder moves forward, the ropes stop the forward travel of the cylinder, and the aggregate effect of the joint spring forces cause the cylinder to reverse direction. Each sphere within the rope exchanges contact impulses with the cylinder using the default-auto impulse model. Note that if the cylinder’s initial speed is too high, the cylinder travels through some of the spheres. To counter-act this, simply reduce the integration time-step size to ensure that the distance traveled between time-steps isn’t too large.

You can also use “dummy” objects to help shape the rope. In the example below, we use three rigid body spheres to help shape the rope’s initial configuration. This is often useful because the camera cannot be repositioned while a rope is being created. Note that for the second rope, we use one of the spheres in the first rope to help form its shape. You can also attach the starting or ending point of a rope to spheres within another rope.

Restraint in a moving rigid body object

In the video below, we create a moving sled with restraints to stop the forward motion of our box. Note that since we wanted to better place the start and end point of our rope, we used dummy spheres to place the start and end of our rope at the desired height, then used spherical joints to connect these points to the sled.

Restrained multibody in a vehicle

Using the same techniques described above, we’ll now add restraints to prevent forward motion of a multibody object. Here you can use the spring and damping values in the “joint” menu to fine-tune the maximum amount of forward travel required for your simulation or visual aid. Notice, in the video below, the upper portion of the shoulder restraint needed to be adjusted by simply deleting the automatically created joints, moving the spheres as needed, and reattaching with new spherical joints. You are also free, of course, to insert new spheres to create additional links as needed. You can even build a restraint by hand starting from your own collection of rigid body spheres.