User mods, screenshots & videos > Vehicles

Kane's Vehicle Topic

(1/2) > >>

Kane98:
Hello everyone. I have been toying around. Therefore I decided that when I upload a vehicle it will be on a megathread, thus preventing useless clutter on the forum page. So here's what I got so far! I have a 1998 Dodge Durango XLT and a 1995 Toyota Corolla http://www.mediafire.com/file/xg3bdb7r97t5bvh/Corolla.Kane98.otx
http://www.mediafire.com/file/u1o43829ejuoul2/Durango.Kane98.otx

These are far from finished, notify me of any bugs ore errors withing "my" script. I used Patmarrnc's tutorial car script and adapted it so its messy.

Images are on the Outerra Discord I cant get them to work for some reason.

Acetone:
Hey, welcome :)

Here is your picture:

Kane98:
Thanks, Acetone!

In other news! I messed things up. Now to have to find out what happened. =D

Kane98:


1983 Nissan Bluebird U11. Some work needs to be done before I feel comfortable to release it such as a weird  steering wheel issue. and other bits.

patmarrnc:

--- Quote from: Kane98 on March 27, 2018, 03:22:02 am --- I used Patmarrnc's tutorial car script and adapted it so its messy.

--- End quote ---

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?

-----------------

Navigation

[0] Message Index

[#] Next page

Go to full version