I am evaluating Bullet for a billiards simulation. I am simulating the table bed and the cushions by static plane shapes. But I find the ball behaviour very incorrect when it travels with relatively low speeds. I can't take a video now but the effect I am describing is this:
My code is here: https://github.com/gtzampanakis/justsho ... ulator.cpp
I have tried changing all the parameters, changing restitutions, frictions, scale, timestep, but the effect remains, i.e. the ball hugs the cushion and stays with it even though the correct behaviour would be for it to bounce off.
Any ideas?
Ball bouncing at very shallow angle
Re: Ball bouncing at very shallow angle
I will look into your code, there might be something wrong with it. Currently I am on holiday, so feedback might take me until next week.
Re: Ball bouncing at very shallow angle
Hi,
I have seen the same in our game supertuxkart (bullet 2.79 though). Here a trace of a (soccer) ball movement (in green) with the static track (walls) in purple, and a zoomed in version: We actually added a push-back force from the wall to avoid the problem that the ball kind of sticks to the wall.
Cheers,
Joerg
I have seen the same in our game supertuxkart (bullet 2.79 though). Here a trace of a (soccer) ball movement (in green) with the static track (walls) in purple, and a zoomed in version: We actually added a push-back force from the wall to avoid the problem that the ball kind of sticks to the wall.
Cheers,
Joerg
Re: Ball bouncing at very shallow angle
Hi,
I've found the problem in our case: the static mesh from which the ball bounces off had no restitution set, so it was 0. The overall restitution is the product of the restitution of both objects, which is then 0 as well, whatever we defined for the ball. We are now experimenting with either giving the actual track restitution (which would change the game behaviour e.g. in case of a kart vs track collision), or changing the restitution combination formula.
Hope that helps someone.
Joerg
I've found the problem in our case: the static mesh from which the ball bounces off had no restitution set, so it was 0. The overall restitution is the product of the restitution of both objects, which is then 0 as well, whatever we defined for the ball. We are now experimenting with either giving the actual track restitution (which would change the game behaviour e.g. in case of a kart vs track collision), or changing the restitution combination formula.
Hope that helps someone.
Joerg
-
- Posts: 11
- Joined: Tue May 31, 2016 3:38 pm
Re: Ball bouncing at very shallow angle
In my case restitution is not zero.
Re: Ball bouncing at very shallow angle
I will look at your issue today as soon as possible. I just created a small breakdown game and the bounces seemed to be realistic so far.
-
- Posts: 11
- Joined: Tue May 31, 2016 3:38 pm
Re: Ball bouncing at very shallow angle
Thanks a million.benelot wrote:I will look at your issue today as soon as possible. I just created a small breakdown game and the bounces seemed to be realistic so far.
For what it's worth, the issue seems to happen only when the velocity of the ball is small.