Game Development Community

Different Tires

by Emerson Gresoski · in Torque Game Engine · 12/14/2006 (2:42 am) · 1 replies

Hi, my car game need that the vehicles have different shapes to the Rear wheels, how I do this? How I use two different shapes for the tires?

#1
12/14/2006 (6:19 am)
You just need to create two different WheeledVehicleTire datablocks; one called FrontTire, and one called RearTire.

Then in the WheeledVehicle::onAdd method you refer to the correct tire like this

%obj.setWheelTire(0,FrontTire);
%obj.setWheelTire(1,FrontTire);
%obj.setWheelTire(2,RearTire);
%obj.setWheelTire(3,RearTire);

Hope that helps.

Thx!
- BigPapa