Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
question about stepSimulation
04-19-2012, 07:50 AM,
question about stepSimulation
Hi all!
i've a question, i'm curious:
in game::Tick function you count how many physics ticks you need to do in a graphics frame, cycle and call for each physTick AdvanceGameLogic, that basically call dynamics.update, that basically do this:
stepSimulation(dt, maxSubSteps, timeStep);
now my question is this:
in this mode, the stepSimulation is called only 1 time to physicsTicks...

why you doesn't allow to stepSimulation to subdivide by phyisics ticks passing dt as graphics frametime??

i've tried but all the loads to the suspensions/wheels are wrong.... is there any thing to understand??

thanks in advance!
04-19-2012, 12:44 PM,
My original intention has been to use bullet fixed step code, put vdrift logic into bullet pre-step, post-step callbacks. But I went for the lazy version and sticked with vdrift time step code. I think I had the (incomplete) callback code somewhere, did some test runs.

If you want to use simulation step with frame time, you'll have to move it out of the vdrift time step loop. Else you will get the funky results you are seeing I guess. If you are interested you could try to modify game class logic to use the callbacks. Patches are very welcome.
04-19-2012, 02:00 PM,
I tried, but I get the same results that I had changing only a bullet freq and not vdrift.. the load is very minor instead the correct weight... seems that some bullet code is updated outside the updateAction method... but I didn't find it..

04-19-2012, 02:15 PM,
Hmm, I'd have to dig up the old code. But the car simulation should run within bullet(without vdrift) with some modifications to the loading routine and wheel rays. One could try to modify one of the bullet demos to run with cardynamics(there is a vehicle demo in the bullet sdk).

It is actually something I wanted to do with the new sim code in my fork. Would be a nice little project.

Forum Jump:

Users browsing this thread: 1 Guest(s)