# How to make the bullet physics update faster?

## Recommended Posts

My bullet physics simulation works very slowly. Let's say, one of the objects is lifting the other one, the takes many many many frames to update to the correct position. Just very laggy...

Can I increase the dt? or decrease it, to make the physics react better?

The fact is I use the gimpact shapes for the forks of the forklift, I can't decompose the forks into many boxes, it's too time consuming...

So I have one 4 bvh static mesh, 8 gimpacts, about 10 boxes...

Thanks

Jack

	l_dynamicsWorld->stepSimulation(dt,100,dt/100);

Edited by lucky6969b

##### Share on other sites

This looks to me as if you are taking 100 sub-steps per tick which would indeed be very slow. Usually you pick a fixed time-step like 30, 60, 120, or even 240 Hz and a fixed number of sub-steps. For games 30 or 60 Hz is a typical choice.

const int MaxSubSteps = 4
const float FixedTimeStep = 1.0f / 60.0f; // Or similar

pDynamicsWorld->stepSimulation( dt, MaxSubSteps ,FixedTimeStep );

I recommend checking out Glenn's post here:

And the Bullet Wiki:

You also posted a bunch of other questions regarding dynamic mesh shape (GImpact) collision. This is usually slow since this is just a very difficult problem. I would not use GImpact shapes in real-time simulations. Use simple hulls or compounds instead.

Edited by Dirk Gregorius

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account

• 9
• 9
• 13
• 41
• 15