Game Development Community

How do I animate a suspension in Torque 3d?

by Trainguy · in Artist Corner · 02/29/2012 (10:11 am) · 6 replies

Hi, I'm working on a offroad driving game in Torque 3d.

I'm having a little trouble getting a rock crawler suspension to properly animate.

I've got it rigged, it just won't move the axles, etc.

Any help would be appreciated,
Trainguy

About the author

Recent Threads


#1
02/29/2012 (1:46 pm)
tear apart the default buggy and scripts ;)
#2
03/01/2012 (7:06 am)
You'll have to look into how the hierarchy of axles to main body of the vehicle is setup (the old buggy or the Cheetah), and also make sure you have some spring datablocks to go with your vehicle and wheel datablocks. I would offer more, but I don't remember the names of the hubs, nodes, or sequences offhand.
#3
03/01/2012 (7:24 am)
Animate what you want to 'move' during a 'spring' sequence; the 'hub' nodes are moved by code, they just need a location to reference. Match your animation data to the values in the datablock for spring....heh-heh-heh

So...animate all 'suspension' parts/geometry needing movement during a 'spring' sequence calling.
#4
03/02/2012 (5:19 am)
What do I need to put in the script under the spring sequence?

I can't find anywhere telling how to animate in a script.
#5
03/02/2012 (5:44 am)
If you are building a WheeledVehicle object, I would strongly suggest you first read up on the objects in the Script Manual before roaring off on an art quest.

I consider them a fairly complex object in that there are 3 datablocks[and 2 art assets] that are combined to produce a 'wheeled vehicle' object. The 'vehicle' itself, the 'wheels', and the 'springs' that connect the 2 previous objects, along with a few animations.

...from the Scripting Manual:
float WheeledVehicleSpring::length 

Maximum spring length. ie. how far the wheel can extend from the root hub position. 

This should be set to the vertical (Z) distance the hub travels in the associated spring animation.

Each wheeled vehicle can have multiple wheels and springs, so many different types can be constructed. Building a vehicle takes a lot of back and forth working with the art and the datablock...

Not having any images or hierarchy to 'guess' from, it's really hard to give a concrete answer of what to do to get it right.
#6
03/02/2012 (10:11 am)
I'd say go with this