How to Drive Rotation From Location in Blender

Driving rotation from location in Blender allows an object to rotate automatically as it moves along a specific axis, making it ideal for animating wheels, gears, or rolling objects without manual keyframing. By applying the Transformation Constraint to an object, you can map its translational movement directly to its rotational values within a defined range. This guide provides a direct, step-by-step walk-through to configure the Transformation Constraint for precise location-to-rotation animation in Blender.

Step 1: Add the Transformation Constraint

  1. Select the object you want to rotate (for example, a wheel mesh).
  2. Open the Object Properties or Bone Properties side panel, or navigate to the Object Constraint Properties tab (the blue chain-link icon) in the Properties window.
  3. Click Add Object Constraint and select Transformation from the Relationship column.

Step 2: Assign the Target and Coordinate Spaces

  1. In the Transformation Constraint panel, locate the Target field.
  2. Select the object that will trigger the movement. This can be the same object (to make it rotate as it moves itself) or a separate control object/empty.
  3. Set the Target Space and Owner Space. For basic setups, leave both set to World Space. If the object is parented or part of a rig, switch both to Local Space.

Step 3: Configure the Source Movement (Map From)

  1. Set the Map From mode to Location.
  2. Enable the axis along which the object will move (for example, the X axis).
  3. Input the source range in the Min and Max fields:
    • Min: 0m
    • Max: 10m
    • Note: This tells Blender that the movement range to evaluate is 10 meters along the chosen axis.

Step 4: Map Location to Rotation (Map To)

  1. Change the Map To mode to Rotation.
  2. Select the axis you want the object to rotate around (for example, the Y axis for a rolling wheel).
  3. Match the target axis to the source axis in the dropdown mapping menu (e.g., set the source X axis to map to the destination Y axis).
  4. Input the destination rotation range in degrees:
    • Min: 0°
    • Max: 360° (or higher for faster rotation).

Step 5: Enable Extrapolation for Continuous Motion

  1. Check the Extrapolate box at the top of the Transformation Constraint panel.
  2. Enabling Extrapolate ensures that the object continues to rotate even when moved beyond the defined Min and Max distance values. Without this checked, the rotation will freeze once the target moves past the specified range.

Step 6: Test and Adjust

  1. Grab the target object in the viewport (G) and move it along the specified translation axis.
  2. If the object rotates in the wrong direction, invert the Min and Max values under the Map To section (e.g., set Min to 0° and Max to -360°).
  3. If the object rotates too quickly or slowly relative to its movement, adjust the distance values in the Map From section until the motion matches the physical dimensions of the object.