Getting articulated vehicles to work
by Andy Hawkins · in Torque Game Engine · 06/11/2008 (3:56 pm) · 2 replies
Does anyone have any code to make an articulated truck work as an AIWheeledVehicle? I need to make a rigg and trailer setup like a Mac truck you would see on the roads everyday.
#2
06/16/2008 (2:26 am)
Andy, Ramen-Sama's pathshape code may do what you are trying. (to a point) It has code to attach an object to the parent that remains with the parent until you release the object. The only problem I can see that may be a deal breaker is turning. You would most likely have to add to his code to get the trailer to follow the truck properly. It's a good place to start tho.
Associate Andy Hawkins
DrewFX
- Use PhysX and set up a joint. Do not render these proxy objects but place the truck rig and the trailer at the calculated positions of the joint per cycle. However I don't even know if this wheels with roll this way.
- Add two front wheel hubs to the trailer but don't render wheels there - something I did for a tank. Then have the trailer "follow" the truck rig closely - updating its position every now and then so they are locked at the pivot.
Any one else care to comment?