Hello, i am creating a billiard game, and till now bullet physics has solved many of my issues.
but in using bullet physics another came up which i understand is a bug having to do with the rolling friction creating a curved trajectory.
there was a fix introduced on march 4, but i think it was localized to the featherstone build and also the multiBody function of the engine, not sphere.
so how can i fix this.. i am using Bullet 2.83 on Unity Engine.. so thus i use mainly BulletUnity;
I could increase angular damping when the ball is rolling, because setting it to one value will cause it to roll too long when the velocity is less due to the function being non linear.. but when I do this it creates variables which I dont want since i am also simulating offline for trajectory..
The only fix which will keep stability is fixing the rolling friction..
curved trajectory(rolling Friction) fix for bullet in unity
-
- Posts: 15
- Joined: Mon Dec 09, 2019 1:10 pm
-
- Posts: 849
- Joined: Tue Sep 30, 2014 6:03 pm
- Location: San Francisco
Re: curved trajectory(rolling Friction) fix for bullet in unity
Looking at the git commit history...
A fix for rolling friction was committed in March 2019:
Meanwhile Bullet version 2.89 was tagged in October:
I don't know how to setup/install/use Unity however I would guess there are two possible paths forward:
(1) Checkout Bullet 2.83, port the work in pull request 2138 into it, and build custom 2.83 libs for your Unity installation or...
(2) Checkout Bullet 2.89, build it, shoehorn it into your Unity setup and hope the API hasn't changed too much. There are probably some 2.84 - 2.89 release notes somewhere saying whether the API has changed enough to make them incompatible with earlier versions.
A fix for rolling friction was committed in March 2019:
Code: Select all
commit 4c375588054dd3f99a1b0da00a68cc4a15b2136e
Merge: 0c1faf18b 04441a29c
Author: erwincoumans <erwin.coumans@gmail.com>
Date: Sun Mar 3 20:56:12 2019 -0800
Merge pull request #2138 from erwincoumans/master
Implement 'cone friction' for the rolling friction, to avoid curved t…
Code: Select all
commit bda04cf90465e43384c86a8fe4c8cc230c95b8e2
Merge: a1cb87cdb b2732b16b
Author: erwincoumans <erwincoumans@google.com>
Date: Wed Oct 30 13:14:49 2019 -0700
Merge pull request #2459 from erwincoumans/master
bump up to Bullet version 2.89 and update serialization structures
(1) Checkout Bullet 2.83, port the work in pull request 2138 into it, and build custom 2.83 libs for your Unity installation or...
(2) Checkout Bullet 2.89, build it, shoehorn it into your Unity setup and hope the API hasn't changed too much. There are probably some 2.84 - 2.89 release notes somewhere saying whether the API has changed enough to make them incompatible with earlier versions.
-
- Posts: 15
- Joined: Mon Dec 09, 2019 1:10 pm
Re: curved trajectory(rolling Friction) fix for bullet in unity
Thanks I will try your suggestions and update this l post if anything works or doesnt
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: curved trajectory(rolling Friction) fix for bullet in unity
Good point, I will create a 2.89 release soon (in October was just a file change, not a real 'tag')
-
- Posts: 15
- Joined: Mon Dec 09, 2019 1:10 pm
Re: curved trajectory(rolling Friction) fix for bullet in unity
would be great! thank you..
-
- Posts: 7
- Joined: Sun Oct 06, 2019 9:10 pm
Re: curved trajectory(rolling Friction) fix for bullet in unity
Bumping this thread, because even after installing 2.89 I am having problems with curved trajectories because of rolling friction on the release 2.89. Any possible explanation for this? The issue is also still open. I am using just the c++ library. Do I need to do anything special to enable the cone friction approximation?
-
- Posts: 7
- Joined: Sun Oct 06, 2019 9:10 pm
Re: curved trajectory(rolling Friction) fix for bullet in unity
Turns out I am stupid and was using btRigidBody. The problem is only solved for btMultiBody.