General_Subway
Level: 68
/underground.gif)
Position: Registered User
Joined: 29 Jul 2007
Posts: 8
Kel: 11 [ Donate ]
Online Status: Offline
|
Posted: Sun Feb 17, 2008 3:05 pm Post subject: How to create trucks with trailers |
|
|
Do you remember the "Big Rig"-Truck in good old CnC Generals? Its not difficult to create a truck with trailer in TW.
First, create a model of a truck with a trailer and texture it. Truck and trailer must be own meshes.
"truckexample.jpg" shows my truck. Not beautiful, but its just an example 4 this tutorial.
Then select your truck and name it CAB (or whatever you choose)
After this, select the trailer and name it TRAILER.
Now its time to set up the pivots. The pivot's coordinates of truck and trailer must be the same. Place them at the hitch position (pivotpoint.jpg).
Export your model.
In the xml-File of your model, go to the "TruckDraw"-Module and add this (above "LeftFrontTireBone=..."):
CabRotationMultiplier ="1.0"
TrailerRotationMultiplier ="1.0"
CabBone="CAB"
TrailerBone="TRAILER"
RotationDamping ="0.7"
Last, create the needed entries in LogicCommand.xml etc.
Compile your mod and start it.
Works fine 4 me, but "don't drive over hills" ;-) .... that looks a little bit ugly
| Attachment: |

|
| Filename: |
truckexample.jpg |
| 9.46 KB :: Viewed 2159 Time(s) :: [ Download ] |
|
| Attachment: |

|
| Filename: |
pivotpoint.jpg |
| 7.41 KB :: Viewed 2159 Time(s) :: [ Download ] |
|
|
|