Creating a new TowedVehicle Class
by Mark Dynna · in Torque Game Engine Advanced · 09/04/2007 (4:00 pm) · 2 replies
I'm looking for some high-level direction from people who have been down this road before.
I'm looking at implementing a new TowedVehicle class for a vehicle that will have 2-4 wheels and be towed by 2-4 "animals" in the front. I've been looking at how to implement this as a new object. As I see it there are 2 major paths to take:
I'm looking at implementing a new TowedVehicle class for a vehicle that will have 2-4 wheels and be towed by 2-4 "animals" in the front. I've been looking at how to implement this as a new object. As I see it there are 2 major paths to take:
- Create it as a Vehicle-inherited object, patterned after WheeledVehicle, but with some Animal objects at the front with steering instead of wheels
- As a ShapeBase-derived object, like the BT Tank Pack does, to avoid having to deal with all the RigidBody functionality
#2
09/05/2007 (7:34 pm)
Well, I suppose vehicle-style physics would be preferable. In the end I just want it to behave as realistically as possible. The part that I really like about the WheeledVehicle setup is the fact that the towing animals can easily interchanged with different base models, so I'm going to give it a try and see if I can make it work like I want.
Torque Owner Brian Richardson
If you can get away with simpler behavior, then option 2 is best. You can simplify your model and probably just get away with doing some simpler physics.