Hi.
I'm developing a billiards game in which I use sensors to check if a ball has reached the pocket and should be removed. Generally, it works fine but there's a problem when a ball is very close to the sensor and is shot towards it with a high velocity. Collision with the sensor is not detected. What's odd is that just behind the sensor is a static body which the ball bounces off correctly ( so I would assume Box2d is doing CCD then and at that point the ball is over the sensor so it should be detected too).
The sensors are set as static bodies (tried kinematic bodies as well) with no mass and density set to 0. Balls are set as bullets.
I tried tampering with b2Settings as well as setting a lower step for the simulation. At some point when changing the step the sensors start to work with high velocity bodies but, due to great amount of graphics, the whole game runs slower and I cannot have that in a billiards game.
Any ideas on how to solve this would be greatly appreciated.
Also, if You need additional information on the issue, please write it here and I'll post what's needed.
I'm developing a billiards game in which I use sensors to check if a ball has reached the pocket and should be removed. Generally, it works fine but there's a problem when a ball is very close to the sensor and is shot towards it with a high velocity. Collision with the sensor is not detected. What's odd is that just behind the sensor is a static body which the ball bounces off correctly ( so I would assume Box2d is doing CCD then and at that point the ball is over the sensor so it should be detected too).
The sensors are set as static bodies (tried kinematic bodies as well) with no mass and density set to 0. Balls are set as bullets.
I tried tampering with b2Settings as well as setting a lower step for the simulation. At some point when changing the step the sensors start to work with high velocity bodies but, due to great amount of graphics, the whole game runs slower and I cannot have that in a billiards game.
Any ideas on how to solve this would be greatly appreciated.
Also, if You need additional information on the issue, please write it here and I'll post what's needed.