Ball and Racquet Simulation Help Needed

Post Reply
bkeyes
Posts: 1
Joined: Wed May 03, 2017 12:18 pm

Ball and Racquet Simulation Help Needed

Post by bkeyes »

Hello, I'm working with Ammo.js (a Bullet Physics port to Javascript and the web). I'm working on some WebVR ideas. This question however relates to the Bullet Physics engine in general.

Overall I've got a lot working and I'm learning a lot. I've got discrete collisions working nicely. I've got collision detection and event notification of the collisions working nicely. And I've got decent control over restitution and friction.

I've got continuous collision detection of a fast moving ball with walls or the ground working well - no tunneling.

However I have not been successful in getting a fast moving racquet to consistently make contact with a fast moving ball.

I've played around with the rigidbody settings using setCcdMotionThreshold and setCcdSweptSphereRadius and I think I understand them.

It looks like the problem I'm having is that there's not a good way to map a thin flat object ( a tennis racquet for example) with a swept sphere. If I set the swept sphere to encompass the whole racquet face then the 'collision' with the racquet face seem to occur at the sphere radius distance from the face. If I set the swept sphere to be contained within the racquet (ie: set the shortest dimension, the thinness of the racquet) then collisions only happen if the ball hits that small centerpoint where the swept sphere is. The ball goes through most of the racquet face.

Am I missing something ? Is there another option for continuous collision detection - a swept box of some type ? Any other ideas ? Pointers to any examples in any language ?

Thanks in advance for any help or pointers.
Post Reply