Game Development Community

WheeledVehicle questions

by Christopher Evans · in Torque Game Engine · 12/21/2008 (7:44 pm) · 1 replies

I been trying to create my own car, and I am having some issue. First I created a car using blender and I think I have it exporting correctly. Note I am using blender so this might be causing some of the issues.

It appears to me that the start.racing buggy wheels automagically flip themselves around depending on what side of the car they are on. Is this correct or have I missed where this is being set at? When I try placing my tries on the car they all face the same direction, not mirrored like they are on the buggy.

It also appears that the position of hub0, hub1 is all that matters, in relation to the center of the vehicle. Before I exported my model I moved the location of hub2 and hub3. But when I am in the game it doesn't seem to make a different. But in showtools it shows the node in the correct location. Am I missing something?

Any help would be appreciated.

#1
12/22/2008 (7:35 pm)
I been looking through the engine and I confimed my supection that the only hub nodes that matter are hub0 and hub1 (assuming, that you have a typical 4 wheel vehicle). So no matter how far away you have the hubs nodes points it takes to position of the first two and just mirrors it on the other side.

I case you are wondering why I care about this, my vehicle isn't symmetrical. And the wheel are not appearing in the correct location.

The section of code that does this is "WheeledVehicleData::mirrorWheel(Wheel* we)" around line 322. It looks like they do this for figure out Anti-sway force, but thats a guess.

Note: I am using TGE 1.5.2

I still looking at how the wheel automagically flip themselves, but this is now more out of curiosity since I found out what the issue was.