1. Create a cylinder (for this exercise, just use 7 sides to be able to see the rotation easily. Give it a radius of 50. Place it onto the x axis. Choose the cylinder, right click >wire parameters>transform>Rotation>Y Rotation- Click the dotted line cursor on an empty space in the world.
2.This will open up the wire parameters for the world. Choose ‘Objects> Cylinder 1> Y Rotation
3. To set the speed of rotation correctly, add a /50 (or whatever your radius is) to the X_Position expression in the wiring parameters box.
For two wheels of different sizes-
1. In the front Viewport, Create 2 wheels, one with a radius of 40, and the other 20. The Front Viewport is important. Create a dummy for each wheel and align them to the wheel centres. Now create a third controller dummy somewhere above the wheels.
2. Link the wheels to their dummys, then link those dummys to the controller dummy. (To test this- move the big dummy- the rest of the objects should also move with it.
3.Right click the controller dummy, choose Wire parameters>Transform> Position> X Position . Now click the dotted line to one of the wheel dummys, and choose Transform>Rotation > Z Rotation. Choose a forward control direction and click update. The wheel will rotate, but much too fast- in the Wire Parameter expression box divide the X-position by the radius size of the wheel. (Ie for the small wheel the expression should read ‘ X_Position/20). If the wheel rotates in the wrong direction, ie rolling backwards when it should be moving forwards, simply change the expression to divide by a minus number rather than a positive (ie. for the small wheel divide by -20 instead of 20.).
Do the same for the other wheel and both wheels should rotate accordingly.
Now- unfortunately This rig will only work for a scenario where the wheels move forward and back. To Make it look more realistic and have your car or whatever turn a corner, we must create a path.
1. Create a path from a spline line.. Now adjust your timeline that you have 200 frames instead of 100, just so we have more time to play with.
2. Connect the 2 wheel dummy-car to the path : Select the object. Choose the Motion tab at the right, then assign controller. Choose the Position oftion from the dropbox, then click the little notebook button just above. From teh list that appears choose ‘Path Constraint. In the path parameters dropdown that appears in the modify panel click ‘Pick path’- then click on the spline we just created. Click on the ‘Follow’ check box so that the vehicle will rotate itself along the path. (otherwise it will always face the same way when moving round the path.
3. Unfortunately the wheels are not rotating now. Click on the spline, then choose Helpers>Measure in the modify panel. Take note of the dimensions of the spline.