I am trying to rotate a set of limbs on a centipede all slightly offset from each other in a 360 degree cycle. Each one will have a driver with an offset, thus the centipede would walk as seen here https://www.youtube.com/watch?v=ivWcwgfWR7Y

The turning of a main control wheel offsets the y-height of the target bone by x amount.

The driver so far is this


where v (var) is the z rotation of main wheel, and drives the y height of bone. How can I offset the expression so that, say, plus %10 of rotation causes the next limb to lag or lead height by 10 percent?


Note that the wheel is located toward center/root of centipede.


Use self and a custom property

enter image description here Offsets L to R, -pi / 2, -pi / 4, 0, pi / 4, pi / 2

Using a simple example with 5 cubes as feet and another as the wheel.

enter image description here

Add a custom property to foot, if you are driving a pose bone add a custom property to the bone.

Helper script to add a custom property named "offset" (edit to suit) to all selected pose bones.

import bpy
from bpy import context

propname = "offset"

for pb in context.selected_pose_bones:
    pb[propname] = 0.0 # set a float proprty

enter image description here

Drivers have a use self option. When on self in an expression refers to the object being driven. The custom property on the object can be added to an expression as self["prop"] Pick a better name than prop.

'rot' is a variable set up as usual getting the local rotation of the spinning cube. We offset that rotation by adding the value of the property to it.

abs(sin(rot + self["prop"]))
| improve this answer | |
  • $\begingroup$ I'm implementing this now...gonna accept once its working. Are you using the new Blender beta? Some things seem different on my end. $\endgroup$ – Leo Blanchette Mar 10 '19 at 5:21
  • $\begingroup$ Yes I'm using 2.8. Everything mentioned is available in 2.79. $\endgroup$ – batFINGER Mar 10 '19 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.