| Author | Ubuntuist - www.elysiun.com member |
| Hyperlink | http://blenderartists.org/forum/showthread.php?t=72162 |
| Category | Animation |
| Title | Using pydriver for wheel rotation along path |
TUTORIAL AS QUOTED FROM SOURCE
I made a little test scene for using them for controlling wheels when vehicle follows path.

I did not find any previous examples of doing this so here is my solution:
When the length of the curve (actual length, not path length) and radius of the
wheel are known, the rotation can be calculated based on Speed-curve that
controls the vehicle motion.
Here is the expression from my sample file:
b.Ipo.Get("ppspeed").getCurve("Speed").evaluate(b. Get("curframe")) *
(47.5/21.1) * (-36)
47.5 is the lenght of the path and 21.1 is perimeter of the wheel.
I did not quite understand the logic of the rotation handling of this driver.
Rotations are n * 10 degrees, so if I want to rotate object 90 degrees, the
script must output 9. Thas why there is 36 in the expression above.
BLEND FILE