I used Patmarrnc's tutorial car script and adapted it so its messy.
Hi Kane98,
The script provided with my tutorial is very bare-bones, and therefore probably more difficult to improve it than to start with a better script.
If you start with the script for one of the included vehicles (such as the BMW or Porsche) , once you reconcile the Wheel & Steering wheel bone name references, you will automatically inherit a lot of features, such as brake lights, head lights etc.
The main thing in adapting a script to a model is knowing what bones the script will try to move, and make sure your model has an equivalent bone with the same name used in the script.
If your model doesn't have all the bones (moving parts) referenced by the script, you can either REM those lines in the script or modify your model
-------
Regarding wonky steering wheel rotation:
steering wheels tend to rotate incorrectly because the angle of the steering wheel is different from one model to the next, so it is unlikely that a vehicle's steering wheel vector can be cut and pasted from another vehicle. If the vector is wrong, the steering wheel will rotate "out of round"
The rotating vector must match the angle of the steering wheel. Here is the line in the script that defines the steering wheels rotation vector:
this.geom.rotate_joint_orig(swheel_id, steerAngle, {x:0,y:.766,z:.642});
To get the vector right, first you must determine the angle of the steering column (relative to the road)
Once you know the angle, use a calculator or reference table to get the sine and cosine of that angle.
The Y value should be the sine, and the Z value should be the cosine
A little more about vectors:
---------------------------
this.geom.rotate_joint_orig(swheel_id, steerAngle, {x:1,y:0,z:0}); <- in this case all rotation happens about the X axis
this.geom.rotate_joint_orig(swheel_id, steerAngle, {x:0,y:1,z:0}); <- in this case all rotation happens about the Y axis
this.geom.rotate_joint_orig(swheel_id, steerAngle, {x:0,y:0,z:1}); <- in this case all rotation happens about the Z axis
this.geom.rotate_joint_orig(swheel_id, steerAngle, {x:0,y:.766,z:.642}); <-- when rotation occurs at an angle to an axis, its vector is shown like this (sine + cosine)
-------------------
these are nice models! Did you model them? Or are they adapted from sketchup or other site?
-----------------