• Advertisement
Sign in to follow this  

I need some information about timing when doing car physics.

This topic is 1325 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.
 

Problems Description:
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:

car:

  1. load car setup (a.k.a. configuration)
  2. givewheels to differential (to compute the average speed)
  3. update driveline mechanics (gearbox, clutch engine)
  4. get information after update (drivetrain torque etc.)
  5. update differential (powered wheels)

wheel:

  1. update raycast
  2. update geometric effects (steering geometry)
  3. load wheel setupa.k.a. configuration)
  4. update suspension (compression and force, also get normal force from here)
  5. update tire (slip ratios, slip angles, low speed friction model & pacejka)
  6. calculate wheel accelerations (apply braking and traction torque, angular velocity calcs)
  7. 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?

Thanks!

 

Edit:
Wobbling only occurs when on throttle, while coasting or trusting (applying a force to push the car) the wobbling doesnt occur at all...

 

Edit2:
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

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement