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.
Two questions about bullet.
- Erwin Coumans
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
- Contact:
Re: Two questions about bullet.
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.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. ??
Have you tried setting the contact processing threshold to zero?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?
Code: Select all
object->setContactProcessingThreshold(0.f);
Erwin
Re: Two questions about bullet.
That helped me, thank You very much!Erwin Coumans wrote:Thanks,Code: Select all
object->setContactProcessingThreshold(0.f);
Erwin
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.
Re: Two questions about bullet.
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.
Re: Two questions about bullet.
Thanks for asking.
We've got various suggestions from these portion.
We've got various suggestions from these portion.