[21] | 1 | <ogreode> |
---|
| 2 | |
---|
| 3 | |
---|
| 4 | <!-- Create the vehicle using the supplied name and body mesh, make it 1.5 units heavy |
---|
| 5 | e.g. tonnes and offset the center of gravity by half (a metre) to make it more stable |
---|
| 6 | This puts the CoG somewhere around the wheel hubs, which is probably reasonably |
---|
| 7 | realistic for a sports-car --> |
---|
| 8 | <vehicle name="Subaru"> |
---|
| 9 | |
---|
| 10 | <body mesh="scooby_body.mesh"> |
---|
| 11 | <mass value="1.5" x="0" y="-0.5" z="0" /> |
---|
| 12 | </body> |
---|
| 13 | |
---|
| 14 | <!-- Create all the wheels, using the supplied mesh and with the specified offset |
---|
| 15 | relative to the car. The mass is 0.02 units, in our case that's around 20Kg --> |
---|
| 16 | <wheel mesh="scooby_wheell.mesh" x="0.8045" y="-0.46698" z="1.4" mass="0.02"> |
---|
| 17 | <steer factor="1" force="8.0" speed="4.0" limit="0.75" /> |
---|
| 18 | <brake factor="0.75" /> |
---|
| 19 | <contact bouncyness="0.9" friction="1.5" fds="0.002" /> |
---|
| 20 | </wheel> |
---|
| 21 | <wheel mesh="scooby_wheelr.mesh" x="-0.8045" y="-0.46698" z="1.4" mass="0.02"> |
---|
| 22 | <steer factor="1" force="8.0" speed="4.0" limit="0.75" /> |
---|
| 23 | <brake factor="0.75" /> |
---|
| 24 | <contact bouncyness="0.9" friction="1.5" fds="0.002" /> |
---|
| 25 | </wheel> |
---|
| 26 | <wheel mesh="scooby_wheell.mesh" x="0.8045" y="-0.46698" z="-1.4" mass="0.02"> |
---|
| 27 | <power factor="1" /> |
---|
| 28 | <brake factort="0.25" /> |
---|
| 29 | <contact bouncyness="0.9" friction="1.5" fds="0.002" /> |
---|
| 30 | </wheel> |
---|
| 31 | <wheel mesh="scooby_wheelr.mesh" x="-0.8045" y="-0.46698" z="-1.4" mass="0.02"> |
---|
| 32 | <power factor="1" /> |
---|
| 33 | <brake factor="0.25" /> |
---|
| 34 | <contact bouncyness="0.9" friction="1.5" fds="0.002" /> |
---|
| 35 | <suspension spring="90" damping="0.95" step="0.01" /> |
---|
| 36 | </wheel> |
---|
| 37 | |
---|
| 38 | <!-- Set up the suspension spring and damping constants, passing the rate we're going to |
---|
| 39 | be stepping the world so it can work out the forces needed each step |
---|
| 40 | We could do this per-wheel, like the other factors, but it's easier to do it this way. |
---|
| 41 | N.B. You must create the wheels before you can do this! --> |
---|
| 42 | <suspension spring="90" damping="0.95" step="0.01" /> |
---|
| 43 | |
---|
| 44 | <!-- Set the engine (and other drivetrain) parameters, lots of work still to do here! --> |
---|
| 45 | <engine redline="70.0" brake="10.0"> |
---|
| 46 | <torque min="0.25" max="5.0" /> |
---|
| 47 | </engine> |
---|
| 48 | </vehicle> |
---|
| 49 | |
---|
| 50 | </ogreode> |
---|
| 51 | |
---|