Game Development Community

Bug In Wheeled Vehicle Animation Code?

by Demolishun · in Torque Game Engine · 08/20/2006 (10:03 pm) · 8 replies

UPDATE: Okay, it is a strange interaction with IK animations and multiple actions. This is a Blender exporter issue.


I cannot get all the wheels to animate properly using the spring sequences. Only the front right wheel animates. The sequences work correctly under the show tool.

Also, in the updateWheelThreads function if I modify this call:
mShapeInstance->setPos(wheel->springThread,pos);

to this:
mShapeInstance->setPos(wheel->springThread,0);

Only the right front wheel shows the proper extension of no extension. The other 3 remain fully extended. There is surely something wrong with the wheeledVehicle animation of the wheel suspsension.

I will try tracking it down, but this is definitely a bug. Also, this problem seems to exist on both Torque 1.3 and 1.4. Probably never noticed because most people just let the code do the animation.

About the author

I love programming, I love programming things that go click, whirr, boom. For organized T3D Links visit: http://demolishun.com/?page_id=67


#1
08/20/2006 (11:24 pm)
Coming from a artist side its tricky to make the car animate properly took a lot of exports to get mine right
no real docs i just studied the GG buggy in a max file and reworked that for to export cars in Maya.
Its a matter of getting the parts to all move in the right keys starting a hub0 going clockwise to hub3.
#2
08/21/2006 (6:39 pm)
Dave,
Do you have linkages in your animations for the hub movement? And it works. Why would show tool work, but not the engine?
#3
08/21/2006 (6:50 pm)
What software are you using? 3dsmax? I just finished making a vehicle in max and had no problems with export or in game all wheels animate. If your using max I could check it out for ya if you like.
#4
08/21/2006 (7:56 pm)
Blender.

Now did you animate linkages or just the wheels? There is a huge difference.

I am going through the code and it looks like the dirtyMask is not being set or the animation is not recognized as a certain type of animation. If it is the latter then it is the exporter that is not checking some type bit?

I did find one small discrepency in the export of the other 3 sequences. Even though there were only two frames, the exporter kept seeing 41. I changed these to two by moving the number to one and back to 2. However, I am still seeing the same problem. I can't tell if it is an exporter issue or a Blender exporter issue.

Does someone have an example DTS that shows animations for the hubs with linkages?
#5
08/22/2006 (6:32 am)
Ive never used blender before, but in max I animate the hubs(hub0,etc.) which are linked to the suspension so when the hub moves the suspension moves with it. Now the only problem I had when I first attempted a vehicle was that the spring sequences (spring0, etc.) were not on the same keyframe as there hub keyframes were.

I found this in the TDN that might help. Its a working blender made vehicle. Doesnt say if it has a suspension though.
tdn.garagegames.com/wiki/DTS/Blender/Creating_a_Simple_Wheeled_Vehicle
#6
08/22/2006 (7:10 am)
When i animated my hubs i found as long as i kept the springs/shocks "moving parts" in the same key frames they moved with the wheels make sure not to overlap frames
#7
08/22/2006 (6:14 pm)
So your saying the code works fine. Then I will stop looking at the code and find what the heck is wrong with my model.
I will let you know what I find out.

Thanks everyone,
Frank
#8
08/23/2006 (8:09 pm)
Okay, it is a strange interaction with IK animations and multiple actions. This is a Blender exporter issue.