Two questions about bullet.

Post Reply
Dagenoth
Posts: 2
Joined: Fri Nov 12, 2010 7:06 pm

Two questions about bullet.

Post by Dagenoth »

Hi.

I`m working on a game where player is a Ball (btSphereShape), and it rolls on a big level (btBvhTriangleMeshShape).

1. I`ve seen many times on this forum that objects in physical world should have size around 0.2 - 10 units, and not too big triangles in mesh shapes ( < 10 units). Also gravity around 10. Will bullet work fine and optimal if I scale all parameters up, for example: objects sizes around 1-50 units, gravity ~200 etc. ??

2. I have a problem with internal edges in plain regions in my collision triangle meshes. I use btInternalEdge Utility but still sometimes when I roll sphere on a plain triangle mesh, sphere bounces on internal edges (not always, but still sometimes it occurs). Any ideas how I can fix this problem?

Thanks for Your help,
Dawg.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Two questions about bullet.

Post by Erwin Coumans »

Dagenoth wrote:Hi.

I`m working on a game where player is a Ball (btSphereShape), and it rolls on a big level (btBvhTriangleMeshShape).

1. I`ve seen many times on this forum that objects in physical world should have size around 0.2 - 10 units, and not too big triangles in mesh shapes ( < 10 units). Also gravity around 10. Will bullet work fine and optimal if I scale all parameters up, for example: objects sizes around 1-50 units, gravity ~200 etc. ??
It is generally best to keep the physics object sizes and masses around 1, and if necessary convert the scale between physics and graphics instead.
2. I have a problem with internal edges in plain regions in my collision triangle meshes. I use btInternalEdge Utility but still sometimes when I roll sphere on a plain triangle mesh, sphere bounces on internal edges (not always, but still sometimes it occurs). Any ideas how I can fix this problem?
Have you tried setting the contact processing threshold to zero?

Code: Select all

object->setContactProcessingThreshold(0.f);
Thanks,
Erwin
Dagenoth
Posts: 2
Joined: Fri Nov 12, 2010 7:06 pm

Re: Two questions about bullet.

Post by Dagenoth »

Erwin Coumans wrote:

Code: Select all

object->setContactProcessingThreshold(0.f);
Thanks,
Erwin
That helped me, thank You very much!

And here goes another important question:

I have some problems with tunelling of boxes through btBvhTriangleMeshShape. I thought that it will be good to reproduce the problem in one of bullets demos - but when I launched AppConcaveDemo I`ve realized that this problem already exists there!
In that app if i shoot some boxes (with right mouse button) and they hit trianglemesh, quite frequently they penetrate or completely tunnel through mesh what is unwanted in my use case as hell ;)

Any advices? I need to get rid of this problem in my app :/

Thank You very much for Your help,
Dawg.
User avatar
chaosavy
Posts: 29
Joined: Wed Nov 11, 2009 9:09 pm

Re: Two questions about bullet.

Post by chaosavy »

that may not be a bullet problem per se, but potentially the application speed allows for tunneling. Happens to me in debug mode a bunch, in release objects tend to work fine.
shadiq
Posts: 5
Joined: Sun Jun 05, 2011 3:56 pm

Re: Two questions about bullet.

Post by shadiq »

Thanks for asking.
We've got various suggestions from these portion.
Post Reply