I made a custom vehicle and it has been having a lot of issues. For one thing the model is instantly pulled to the ground and flies all over the place. Also the wheels refuse to stay in the place I put them in blender. I have been messing with the physx model and it doesn't change anything.
Here is a picture of what I am dealing with:
[IMG]http://cloud-3.steampowered.com/ugc/3263170274419038198/B138C2E13D5E089A3DF16B4A89E99A3B863CD260/[/IMG]
[IMG]http://cloud-4.steampowered.com/ugc/3263170274419084190/6718249B487ADF2226CC985CE20C3AC19F48950E/[/IMG]
QC file:
[code]/*
----------------
Buggy (Jeep) QC
----------------
*/
$modelname stroller.mdl
$cdmaterials props/stroller
$origin 0 0 0 90
$scale 1.0
$body "Body" "buggy_reference.smd"
$surfaceprop "metal"
$noforcedfade
$include "buggy_shared.qci"
$attachment "vehicle_driver_eyes" "Rig_Buggy.view" 3.00 0.00 0.00 rotate 0.00 0.00 0.00
[/code]
If anyone simply had a tutorial for how to compile custom Vehicles that would help me also/
You need to make your own vehicle skeleton. The HL2 buggy's isn't going to fit with your model.
I don't use Blender, but I can tell you how I compile vehicles in 3Ds Max.
You need to have the main body, along with the four wheels as separate objects. When you export to .smd, the object's pivot point will be automatically converted to a bone (at least with Cannonfodders .SMD exporter). Make sure to give the body and wheel objects a name, e.g. flwheel, frwheel, as this information will be used in the .QC file.
You'll need some animation sets - the wheels spinning, the wheels turning, and the wheel's suspension travel.
For the wheels spinning, all it needs is all four wheels spinning 360 degrees forward in the span of 10 frames (frames 0-9).
For the wheels turning, it needs three frames.
Frame 0 - turning left
Frame 1 - center
Frame 2 - turning right
Suspension travel needs two frames -
Frame 0 - fully compressed
Frame 1 - fully extended
Export all of them as sequence SMDs and make sure to export the correct animation range (the first frame to the last frame of animation)
Of course, you also need the reference and collision SMDs.
Here's a sample .QC you can use. Note that it may be a little outdated as most people would use $sequence instead of $poseparameter but it still works.
[code]
$modelname "modeldir/model.mdl" // model directory
$cdmaterials "models/modeldir" // material directory
$scale 1.0
$surfaceprop "Metal"
$body "Vehicle" "reference.smd" // change this to the reference SMD's name
$sequence idle "idle.smd" fps 30 // idle.smd, export the model as a 1-frame long sequence
$attachment "vehicle_driver_eyes" "xxx" 0.00 0.00 0.00 rotate 0.00 0.00 0.00 // create an object where the player's eyes will be and put the name of it here
$attachment "wheel_fl" "xxx" 0.00 -0.00 -0.00 rotate -0.00 -0.00 -0.00 // xxx = front left wheel bone name
$attachment "wheel_fr" "xxx" 0.00 0.00 -0.00 rotate -0.00 -0.00 0.00 // xxx = front right wheel bone name
$attachment "wheel_rl" "xxx" 0.00 -0.00 -0.00 rotate 0.00 0.00 0.00 // xxx = rear left wheel bone name
$attachment "wheel_rr" "xxx" -0.00 0.00 -0.00 rotate -0.00 -0.00 -0.00 // xxx = rear right wheel bone name
$poseparameter "vehicle_steer" -1 1
$poseparameter "vehicle_wheel_fl_height" 0 1
$poseparameter "vehicle_wheel_fr_height" 0 1
$poseparameter "vehicle_wheel_rl_height" 0 1
$poseparameter "vehicle_wheel_rr_height" 0 1
$poseparameter "vehicle_wheel_fl_spin" -180 180 wrap
$poseparameter "vehicle_wheel_fr_spin" -180 180 wrap
$poseparameter "vehicle_wheel_rl_spin" -180 180 wrap
$poseparameter "vehicle_wheel_rr_spin" -180 180 wrap
$animation neutral "idle" frames 0 0
$weightlist front_wheels { "wheel_fl" 1.0 "wheel_fr" 1.0 }
$animation turn_left "zzz" frame 0 0 subtract neutral 0 weightlist front_wheels // replace ZZZ with turning animation SMD
$animation turn_right "zzz" frame 2 2 subtract neutral 0 weightlist front_wheels
$sequence turning { turn_left turn_right blend vehicle_steer -1 1 } weightlist front_wheels delta autoplay
// front right
$weightlist wheel_fr { "wheel_fr" 1.0 }
$animation wheel_fr_low "xxx" frame 0 0 subtract neutral 0 weightlist wheel_fr // replace xxx w
$animation wheel_fr_high "xxx" frame 2 2 subtract neutral 0 weightlist wheel_fr
$sequence wheel_fr_suspension { wheel_fr_low wheel_fr_high blend "vehicle_wheel_fr_height" 0 1.0 } weightlist wheel_fr delta autoplay
$animation wheel_fr_spin0 "zzz" frame 0 0 subtract neutral 0 weightlist wheel_fr // replace ZZZ with wheel spin SMD
$animation wheel_fr_spin120 "zzz" frame 3 3 subtract neutral 0 weightlist wheel_fr
$animation wheel_fr_spin240 "zzz" frame 6 6 subtract neutral 0 weightlist wheel_fr
$sequence wheel_fr_spin { wheel_fr_spin0 wheel_fr_spin120 wheel_fr_spin240 wheel_fr_spin0 blendwidth 4 blend "vehicle_wheel_fr_spin" -180 180 } weightlist wheel_fr delta autoplay
// front left
$weightlist wheel_fl { "wheel_fl" 1.0 }
$animation wheel_fl_low "xxx" frame 0 0 subtract neutral 0 weightlist wheel_fl // replace xxx w
$animation wheel_fl_high "xxx" frame 2 2 subtract neutral 0 weightlist wheel_fl
$sequence wheel_fl_suspension { wheel_fl_low wheel_fl_high blend "vehicle_wheel_fl_height" 0 1.0 } weightlist wheel_fl delta autoplay
$animation wheel_fl_spin0 "zzz" frame 0 0 subtract neutral 0 weightlist wheel_fl
$animation wheel_fl_spin120 "zzz" frame 3 3 subtract neutral 0 weightlist wheel_fl
$animation wheel_fl_spin240 "zzz" frame 6 6 subtract neutral 0 weightlist wheel_fl
$sequence wheel_fl_spin { wheel_fl_spin0 wheel_fl_spin120 wheel_fl_spin240 wheel_fl_spin0 blendwidth 4 blend "vehicle_wheel_fl_spin" -180 180 } weightlist wheel_fl delta autoplay
// rear right
$weightlist wheel_rr { "wheel_rr" 1.0 }
$animation wheel_rr_low "xxx" frame 0 0 subtract neutral 0 weightlist wheel_rr // replace xxx w
$animation wheel_rr_high "xxx" frame 2 2 subtract neutral 0 weightlist wheel_rr
$sequence wheel_rr_suspension { wheel_rr_low wheel_rr_high blend "vehicle_wheel_rr_height" 0 1.0 } weightlist wheel_rr delta autoplay
$animation wheel_rr_spin0 "zzz" frame 0 0 subtract neutral 0 weightlist wheel_rr
$animation wheel_rr_spin120 "zzz" frame 3 3 subtract neutral 0 weightlist wheel_rr
$animation wheel_rr_spin240 "zzz" frame 6 6 subtract neutral 0 weightlist wheel_rr
$sequence wheel_rr_spin { wheel_rr_spin0 wheel_rr_spin120 wheel_rr_spin240 wheel_rr_spin0 blendwidth 4 blend "vehicle_wheel_rr_spin" -180 180 } weightlist wheel_rr delta autoplay
// rear left
$weightlist wheel_rl { "wheel_rl" 1.0 }
$animation wheel_rl_low "xxx" frame 0 0 subtract neutral 0 weightlist wheel_rl // replace xxx w
$animation wheel_rl_high "xxx" frame 2 2 subtract neutral 0 weightlist wheel_rl
$sequence wheel_rl_suspension { wheel_rl_low wheel_rl_high blend "vehicle_wheel_rl_height" 0 1.0 } weightlist wheel_rl delta autoplay
$animation wheel_rl_spin0 "zzz" frame 0 0 subtract neutral 0 weightlist wheel_rl
$animation wheel_rl_spin120 "zzz" frame 3 3 subtract neutral 0 weightlist wheel_rl
$animation wheel_rl_spin240 "zzz" frame 6 6 subtract neutral 0 weightlist wheel_rl
$sequence wheel_rl_spin { wheel_rl_spin0 wheel_rl_spin120 wheel_rl_spin240 wheel_rl_spin0 blendwidth 4 blend "vehicle_wheel_rl_spin" -180 180 } weightlist wheel_rl delta autoplay
$collisionmodel "phymodel.smd" // whatever the phys model is called
{
$mass 350 // doesn't really matter, vehicle mass is defined in vehicle script
$concave
}
[/code]
For more info, you can look here
[url]https://developer.valvesoftware.com/wiki/Vehicles_(modeling)[/url]
Sorry, you need to Log In to post a reply to this thread.