Jack-in-the-box with Ballista

With the Ballista dummy in the L1 Force category of the Physics Toolbox, you are able to create a jack-in-the-box. By adjusting the Mass value, the entire structure can become more jittery or stable.

Setting Components of the Jack-in-the-Box

The structure of the Jack-in-the-box is simple. Simply apply a box and a prop and the structure is complete.

  1. Apply an Infinite Plane from the Prop > Physics Props library.
  2. Apply a box and a ball from the Prop > 3D Blocks library and position the ball inside the box.
  3. Select both the box and the ball, set them as Dynamic rigid bodies.
  4. When you playback to simulate, the two entities blow each other off because of the collision effect feature of dynamic rigid body props.

Combining Dynamic Components

After the ball is controlled by the Ballista dummy, you may pick the box as the target of the ball, which eliminates the collision between the box and the ball.

Controlling the Rigid Body with Ballista Control Panel

  1. Apply the Ballista from the L1 Force category of the Physics Toolbox library.

    By default, the ballista dummy moves along the Local X axis.
  2. Double click on the blank space of the Control to open the Advanced Panel.
  3. Pick the ball as the target object via the advanced panel.
  4. Change the springing direction to the Z axis in order to get the ball to pop upward.
  5. Close the advanced panel and click the Shoot button to have the ball pop up. Please note that the ball and the box have no connection to each other. The force created by the popping does not convey to the box.

Constraining the Ball to the Box

  1. Select the ball and open the Constraint Settings panel (Shortcut: Shift + F10). The ball is applied with a Spring constraint.
  2. Pick the box as the target by pressing the Pick Target button and clicking on the box.
    • The collision effect is eliminated because of the deactivation of the Collision Constrained Object feature.
  3. Click the Shoot button on the control. The box will pop up along with the ball because of the strength of the spring movement of the ball.

Setting Mass to Balance the Structure

The box bounces up with the ball because the spring effect is too strong. In order to keep the structure placed on the ground with slightly hopping behavior, you need to adjust the mass of the box.

  1. Select the box.
  2. Open the Object Physics Settings panel (Shortcut: Shift + F9).
  3. Increase the Mass value of the box.
  4. Click the play button on the control to observe the spring effect of the structure.
  5. Repeat step 3 and 4 and test it until you get an ideal result.

Hiding the Dummy

The Ballista dummy does not need to be shown; however if you delete it, the control panel will be removed as well. In order to keep the control panel while having the dummy disappear in the scene, you need to follow these steps to hide it.

  1. Select the Ballista dummy.
  2. Make sure the Set As Dummy feature of the Ballista dummy is activated.
  3. Right click on the dummy and select Remove All Animation to remove the simulated physics result to keep the data of the project minimized.
  4. Open the Object Physics Setting panel (Shortcut: Shift + F9) and deactivate the Activate Physics box. This step ensures that the dummy will never bump into any other physics objects if you want to simulate more physics animation later on.
  5. Press (Ctrl + D) to hide the dummy. You may then use the control panel to simulate unlimited times without being interfered by the irrelevant ballista dummy.