Confining Movement with Generic Constraint � Climbing a Pole

With the motors in the L1 Force category of the Physics Toolbox, the custom structure are not only able to move along the ground plane, but also any particular direction by adding a Generic Constraint. In the following example, a wheel is set up to climb a vertical pillar.

Creating a Wheel

  1. Optionally apply an Infinite Plane from the Physics Props library to act as the ground surface.
  2. Apply a box and transform it to a pillar. Set it as a Static rigid body.
  3. Motor Aand move it so that it contacts the pillar. This will later act as the wheel.
  4. Play to simulate and the motor rotation. The motor will spin in place because it is constrained to the World (Press Shift + F10 to view the constraint of the motor).

Setting the Wheel Free

In order to set the wheel free, you need to constrain it to another free (or axis-limited) moving rigid body.

  1. Apply a box from the 3D Blocks library and move it next to the motor. Set the box as a Dynamic rigid body physics prop.
  2. Select the motor again and pick the box as its target in the Constraint Settings window.
  3. Click the play button on the Physics panel to begin the simulation. The structure will fall because the motor is now constrained to the free-falling box.

Confining the Movement of a Constrained Prop

To prevent the structure from falling, the constraint settings need to be adjusted to restrict its movement, in this case the Local Z axis. You may normally think of the Slider Constraint for this situation, however, since the adjustable parameter of a slider constraint is restricted to only the X axis, you need to spend time to modify the pivot direction of your prop, which can take extra time.

That being the case, it is highly recommended to use the Generic Constraint for confining its movement.

  1. Go back to the start frame and select the box.
  2. Press Shift + F10 to bring up the constraint panel.
  3. Apply a Generic constraint to the box and set it according to the specifications below:
    • Constraint target = World.
    • set the X, Y, Z in the Move section to (Lock, Lock, Limit: -50 ~ 2000). The structure is now allowed to move only along the Z axis.
    • set the X, Y, Z in the Rotation section to (Lock, Lock, Lock)
  4. Press the play button in the Physics Control Tile panel. The structure can now climb along the pillar.

Gravity Resistance

Because of gravitational effect, the structure can not easily climb up unless the velocity of the motor is maximized; while it unexpectedly moves down too fast even if the velocity of the motor is small. You need to adjust your wheel specifications in two ways:

Increasing the Friction

If the Friction value of the motor is low, the motor slips as it rotates, which will prevent your wheel from easily climbing the pillar.

By increasing the Friction value, the effect of the gravity is reduced as the climbing wheel gains a better grip on the surface of the pillar.

  1. Go to the first frame and press Shift + F9 to show the Object Physics Settings panel.
  2. Select the motor and the pillar.
  3. Increase the Friction value.

Fine-tuning the Motor Position

Alternatively, you can also adjust the position of the motor so that it contacts more with the pillar without changing the value of the friction.

  1. Go to the first frame and select the motor.
  2. Zoom in to the contact point of the motor and the pillar.
  3. In the Transform section of the Modify panel, fine-tune the position of the motor by 0.1 at a time so that the motor penetrates the pillar a little but not too much.

After utilizing either of these two methods, press the play button in the Physics Tile Control panel. The structure will then rise and fall more accurately in accordance with the velocity of the motor.