Forums

Full Version: question about stepSimulation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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:
Code:
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!
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.
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..

:cry:
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.