Implementation in a fixed time environment

Paril
Posts: 18
Joined: Tue Feb 22, 2011 4:14 am

Implementation in a fixed time environment

Post by Paril »

So I've been messing with Bullet recently; it turns out to work great for my situation in terms of features, but I cannot for the life of me work the timestep thing out.

I'm trying to run Bullet in an environment where the game portion runs at a fixed step of 10 fps. Attempting to call stepSimulation, I can only get one of two results; super slow motion but perfect physics, or proper speed but tunnelling physics.

I have no idea how to balance the two out.

When I use the maxSubSteps of the stepSimulation I get result 1, otherwise I get result 2.

Code: Select all

		physicsWorld->stepSimulation(1.0f / 10.0f, 1, 1.0f / 10.0f);
Has anyone attempted anything similar? I love Bullet but this timestep thing is really annoying to figure out. It all sounds like it makes sense but no idea why it's not working properly.

-P
Paril
Posts: 18
Joined: Tue Feb 22, 2011 4:14 am

Re: Implementation in a fixed time environment

Post by Paril »

Just in case anyone has the same issue, it seems that Bullet really just can't handle this, so I moved the physics into the server portion instead running it every server frame (I guess this is why Bullet is framerate independent :)), and it works nicely with my 10 fps game logic!

-P