Tractor config
From Suf
Line 47: | Line 47: | ||
0 0 -15 | 0 0 -15 | ||
- | This is the position of the tractor's drawbar. You can use trial | + | This is the position of the tractor's drawbar. You can use trial and error for this but it's nearly impossible. It's much easier to use something like the Physx debugger, Or even better you could activate our own Hookpoint debugging by [TODO] |
WHEEL | WHEEL | ||
Line 54: | Line 54: | ||
This is the first wheel, here we; | This is the first wheel, here we; | ||
*Set the position of the wheel | *Set the position of the wheel | ||
- | *Set | + | *Set whether this wheel drives or not |
- | *Set | + | *Set whether this wheel steers or not |
*Set the collision radius of this wheel | *Set the collision radius of this wheel | ||
*Set the mesh of this wheel | *Set the mesh of this wheel | ||
- | Hopfully, that's pretty self | + | Hopfully, that's pretty self explanatory, and you would repeat this line for the rest of the wheels. |
Revision as of 17:43, 27 November 2007
An Example Tractor
Let's take a look at a basic tractor file:
ExampleTractor.mesh,Example_COLL.mesh,7500,0 -10 3 ENGINE 0.1 CAM 0 12 -6,0 15 -10 HOOK 0 0 -15 WHEEL 6 0 10,false,true,5.0,Example_F.mesh WHEEL -6 0 10,false,true,5.0,Example_F.mesh WHEEL 6 1 -8,true,false,6.0,Example_B.mesh WHEEL -6 1 -8,true,false,6.0,Example_B.mesh
Sections of the file
It might look scary, but once you know what it does, you'll be fine!
ExampleTractor.mesh,Example_COLL.mesh,7500,0 -10 3
On this line we;
- Set the model of the tractor, The model that everybody sees
- Set the collision model of the tractor, this is what collides with everything.
- Set the weight of the tractor
- Set the position of the mass
Typically, the collision mesh will be a low-polly box model of the tractor. It must be under 100 polygons, and it does not need a texture or material since it'll be invisible. The computer will use it to calculate physics collisions.
The position of the mass is very important for good stability. Since we don't see it, we can manipulate it. Here, the mass is set to 0 -10 3, thats 10 units under the tractor, and 3 forwards. It's advisable to set the mass to -50 under the tractor, as this prevents it turning over.
ENGINE 0.1
On this line, we set the power of the engine. This is a very very small number, but we estimate 0.1 = arround 100hp.
CAM 0 12 -6,0 15 -10
This is to set the position of the internal and external camera. They are both vector3d. To get these values you need to use Trial and error.
HOOK 0 0 -15
This is the position of the tractor's drawbar. You can use trial and error for this but it's nearly impossible. It's much easier to use something like the Physx debugger, Or even better you could activate our own Hookpoint debugging by [TODO]
WHEEL 6 0 10,false,true,5.0,Example_F.mesh
This is the first wheel, here we;
- Set the position of the wheel
- Set whether this wheel drives or not
- Set whether this wheel steers or not
- Set the collision radius of this wheel
- Set the mesh of this wheel
Hopfully, that's pretty self explanatory, and you would repeat this line for the rest of the wheels.