Well to start off there's to much code to post, and I dont know exactly where this problem of mine occurs. So I cant even post a part of it. Sorry.
But what I can do, is describe what the car is doing visually. Or for those who ask in PM I can send a private demo To see this error closely.
The rear of the car seems to wobble when accelerating, just as if the car's tires are improperly timed to accelerate, so the left one accelerates and then the right. The differential itself is simple open differential, and it works in C# code, but in C++ it wobbles.
So anyone experienced, what would be the best timing order for doing things in car related setup's ?
I'm doing it in this order atm:
- load car setup (a.k.a. configuration)
- givewheels to differential (to compute the average speed)
- update driveline mechanics (gearbox, clutch engine)
- get information after update (drivetrain torque etc.)
- update differential (powered wheels)
- update raycast
- update geometric effects (steering geometry)
- load wheel setupa.k.a. configuration)
- update suspension (compression and force, also get normal force from here)
- update tire (slip ratios, slip angles, low speed friction model & pacejka)
- calculate wheel accelerations (apply braking and traction torque, angular velocity calcs)
- apply forces ONLY when on ground, otherwise zero slips and forces
So the order from my view looks ok. Ps the order is for a single frame and gets repeated every frame.
This order works in C# as I mentioned before, but in C++ something gets messed up.
I've had issues with C++ for quite some time, but have been able to fix them,
mostly the issues have been about floating point inaccuracy & nan/infinity return's.
Might this problem also be related to the previous issues?
Wobbling only occurs when on throttle, while coasting or trusting (applying a force to push the car) the wobbling doesnt occur at all...
After some fiddling, it seems it's pacejka(combining) related.
Not sure if real tires could produce such effect? At 0 toe and 0 camber it is
Edited by vadevaman, 07 June 2014 - 05:14 AM.