This is one of the company projects for me to bind a car.
- turn the steering wheel, the front wheels can rotate
- move the car, the wheel will rotate, and the wheel rotation angle is generated according to the exact expression of the wheel circumference, etc.
- turn the controller of the wheel, the wheel will rotate.
Steps
1 . Create a Locator
2 . Select the centre points on both sides of the wheel and choose to create a cluster
Place the locator P(point) on the cluster and leave maintain offset unchecked to get the position of the wheel’s centre point.
Note that you select the “standard” one that does not need to be moved first, then select the one that needs to be moved and press P.
Place controller P(point) on the locator and leave maintain offset unchecked
Finally put controller P(parent) on the wheel, check maintain offset
The tire will also rotate when the controller is turned in this way. All these steps are to make the shaft of the controller coincide with the tire.
To refresh this exercise, I made myself another simple version of the wheel. The first is to create the wheel and controller method mentioned above.
Then it is to write an expression that the displacement of the wheel is equal to several times the circumference of the wheel which is 23.14R
So angle = displacement * 360 / 2 * 3.14 * R
The radius of the wheel needs to be measured in the create-measure tools-distance tool
The location of the expression will appear after clicking on properties and selecting edit. Clicking on an attribute of an object brings up the name of an attribute for writing an expression. After writing the expression, add the symbol “;”.
Depending on the direction of displacement to be written on the negative sign or no negative sign
Then to do the drive, the rotation of the steering wheel drives the rotation of the wheels. The process of creating the steering wheel is similar to the above.
Click an attribute, click edit, select set driven key.
Then select the rotation attribute of the steering wheel as the driven body, and select the rotation attribute of the wheel as the driven object.
Click key when both are 0 degrees, click key when the former is 90 and the latter is 60, click key again when the former is -90 and the latter is -60, and then lock the steering wheel’s rotation property with the range of 90 to -90 degrees.
Click on the object, ctrlA to open the properties and find the limit information
Finally, the rotation curve of the control axis expression k-frame is adjusted to a straight line.