Skip to content

Tutorial: how to configure gears

In this tutorial, we will see how to setup gears in Interact.

Getting started

  1. Start by creating a new simulation.

    • Go to INTERACT Menu and click on Interact > Create New Simulation
    • Select your favorite environment
    • Add a desktop player or a virtual reality player.
  2. Import your gear model from CAD file. You can use Pixyz for this, or import an FBX file through Unity native importer.

  3. Rotate the gears as necessary to match the initial position

Setup the first gear

  1. Click on one of the first gear and select INTERACT > Physics > Physicalize object
  2. Select Hinge joint on the following window, it will allow the first joint to rotate.
  3. On the Hinge joint component, click on Pick axis, then pick the translation axis. This tool will detect interesting geometric feature in order to ease the kinematic definition.

    Pick axis

    Your gameobject need to have an Unity Mesh Collider in order to be detected by pick axis tool.

    Make Part Grabbable

    Before INTERACT 23.11+ you need to set your physicalized object as grabbable to grasp the part in VR or using your mouse in Desktop. To do so, click on INTERACT > Scenarize > Make part grabbable.

Setup following gears having same numbers of teeth

  1. Click on the second gear and select INTERACT > Physics > Physicalize object
  2. Select mapped joint on the following window. Mapped joint will mimic the movement of the controlling joint to the current rigidbody. It allows to create complex linked movements, like gears, belt or even windscreen wipers.
  3. On the mapped joint component, select the right translation axis by clicking on Pick axis.

  4. Set the previous physicalized gear as the controlling joint. To do this, drop the previous physicalized gear as the Configuration Transform. This means that the movement from first gear will be applied to this current one.

  5. Change the Scale for "-1" to reverse the copied movement.

    Opposite movement

    Contrary to pulley-belt systems, gears should rotate in opposite direction. This is achieved by adding a minus sign to the Scale parameter.

Setup gears of different size

If the gears have a different amount of teeth, you will need to adapt the Scale parameter. It need to be setup as:

Number of teeth for 1st gear / Number of teeth for 2nd gear.

Ratio

Unity is able to compute basic math operations in the editor fields. You can directly type the formula in the field to have the computed ratio.