I basically want the effect shown in the linked gif, like a cube that roles on the floor and doesn't clip the surface as it moves forward, like a rotating square wheel

I can do the automatic rotation when moving with drivers, but how would I set up the up and down movement as it rotates forward.



Ok a long hard battle with my very limited math knowledge I think I came to an approximate solution.

It is not at all mathematically perfect, meaning the cube will be slightly floating at times, and will appear to slide or drift slightly, but it is as far as I could go.

I would ask anyone with a better math knowledge to improve on this solution.

You will need to set up drivers for it's rotation in such way that say rotation along Y axis will equal pi*locationX

Driver Loc X

For the tricky part, the Z height will be driver by something like:


Where roty is the rotation along the Y axis and sl will be the length of the side of the cube.

If you want it to react to rotation in two axis jus add the equation above to itself 0.5+(abs(cos(2*roty-pi/2))*(sqrt((sl**2)+(sl**2)))) + (abs(cos(2*roty-pi/2))*(sqrt((sl**2)+(sl**2))))

Driver Loc Z

For my case with a 1 x 1 unit cube you would get 0.5+(abs(cos(2*roty-pi/2))*(sqrt(.25**2)))+(abs(cos(2*rotx-pi/2))*(sqrt(.25**2)))


  • $\begingroup$ Is there a blend file for this? $\endgroup$ – Jayem14 Aug 16 '18 at 16:40

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.