Tractor config
From Suf
(→Sections of the file) |
(→Sections of the file) |
||
| Line 33: | Line 33: | ||
The position of the mass is very important for good stability. since we dont see this, 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. | The position of the mass is very important for good stability. since we dont see this, 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 an 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 weather this wheel drives or not | ||
| + | *Set weather this wheel steers or not | ||
| + | *Set the collision radius of this wheel | ||
| + | *Set the mesh of this wheel | ||
| + | |||
| + | Hopfully, that's pretty self explanitory, and you would repeate this line for the rest of the wheels. | ||
Revision as of 19:49, 17 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 will 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 pollys, and it dose not need a texture or material as we will not be seeing it, only the computer will see it.
The position of the mass is very important for good stability. since we dont see this, 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 an 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 weather this wheel drives or not
- Set weather this wheel steers or not
- Set the collision radius of this wheel
- Set the mesh of this wheel
Hopfully, that's pretty self explanitory, and you would repeate this line for the rest of the wheels.
