[ X ]
How to create trucks with trailers
Post new topic   Reply to topic Page 1 of 1
View previous topic :: View next topic  
Author Message
General_Subway
Level: 68



Position: Registered User
Joined: 29 Jul 2007
Posts: 8
Kel: 11  [ Donate ]

Online Status: Offline
PostPosted: Sun Feb 17, 2008 3:05 pm    Post subject: How to create trucks with trailers Reply with quote

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:

truckexample.jpg

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

Attachment:

pivotpoint.jpg

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

Back to top
View user's profile Find all posts by General_Subway Send private message ICQ Number
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1