Download

VR table tennis

Hello.
Been working on table tennis as part of my vr game, but im encountering a issue with the game.
Im not sure on how to handle the ball physics, the standard Physx works pretty well with CCD enabled, but the problem is the players have the ability to smack the ball to near light speed.
Ive tried using projectile movement on the ball with a custom time dilation which worked well apart from the collision detection, its not accurate enough for a hand moving at and reasonable speed and just clips through the ball.
Feel like there is a simpler solution to this that im missing, anyone have a idea or experience with something similar they dont mind sharing?

Thanks

also curious about the same thing. one of the crazy workarounds is adding a separate collision sphere much larger than the ball. when it detects overlap with the hand, get the object-to-hand vector, impact vector, movement vector of the ball and movement vector of the hand. if the actual ball collision does not happen in the next frame, check for these vectors again. if the new object-to-hand vector has a big angle difference from the stored one, you have a high chance that the hand moved through the ball. in such case, fix the ball position and give it impulse calculated from the velocities stored.
the issue, of course, comes from the fact that neither of “before” and “after” frames has a collision in them, while it happened mid-frame. CCD is supposed to fix this, but if it does not, having a larger collision helps detect such cases, but then you have to fix things manually.

interesting approach,
been thinking along the path of a velocity curve. essentially using the physics and CCD to handle collisions but just after a collision it would set the velocity back to something reasonable based on perhaps a logarithmic curve. that way it will plateau the speed out so things dont get ridiculous