Sign in to follow this  
sefiroths

bullet: object with dimension less than 10cm give problem?

Recommended Posts

sefiroths    138
i'm trting to implement something like this:
http://gizmodo.com/5023627/iphone-dice-game-simulates-real-dice-rolling-using-sensors-and-physics

i thought to use bullet but, inside the manual, i have found that is recommended to use object with length not less than 10cm. bur a die is 1cm...
someone has used it?
does it give any problem with this kind of object?
any idea to implement 2 rolling die with physic or similar physic?

thanks

Share this post


Link to post
Share on other sites
jyk    2094
Scale is arbitrary, more or less, so if Bullet recommends not making objects smaller than 10 units in size, just make your dice 10 or more units in size and scale everything else accordingly.

Share this post


Link to post
Share on other sites
dangerdaveCS    122
Yeah, I've run into serious problems with Bullet and small objects (moving through walls and 'jiggling' on the floor rather than resting - unless I use insane time steps like 1000 FPS).

But as jyk says, you just multiply all object sizes by 10 or 100 or whatever to get everything in range. E.g. instead of working in metres, work in centimetres.

Just bear in mind by changing the object size scale, you are also changing your force scale, so if you multiply size by 100, then you must multiply all your forces by 100 (mass remains the same, though).

A problem I kept having, after multiplying gravity by 100, the objects fall too quickly and fall through the ground mesh, so I had to increase the FPS (i.e decrease the timestep) dramatically. It's harsh, but until Bullet sorts out the ContinuousDynamicsWorld it's all we got.

Share this post


Link to post
Share on other sites
MrRowl    2490
Quote:
Original post by dangerdaveCS
A problem I kept having, after multiplying gravity by 100, the objects fall too quickly and fall through the ground mesh, so I had to increase the FPS (i.e decrease the timestep) dramatically. It's harsh, but until Bullet sorts out the ContinuousDynamicsWorld it's all we got.


Implementing continuous collision detection/handling isn't going to solve the problem of inaccurate behaviour at "large" timesteps for small objects. You will always need smaller timesteps for smaller objects (and can get away with bigger timesteps for bigger objects) given a constant gravity. Similarly, if you increase gravity you'll need a smaller timestep.

The reason is that small objects move further than large objects, relative to their own size, due to gravity.

For example, a box 10m in size will fall half its own size in 1 second. A box 1m in size will fall 5 times its own size in 1 second (if gravity = 10m/s^2).

Share this post


Link to post
Share on other sites

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

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this