cancel
Showing results for 
Search instead for 
Did you mean: 

Physics for ball game

g.a.l.a.x.y
Honored Guest

Hello!

Playing with Unity VR and try to make a tennis game. The problem with ball physics. I added physics related things like rigidbody, collider, material. I can keep the ball on my racket but when i push it up quickly the racket goes through my ball. The same when i swing. strange behaviour.  

Params for the ball:

  • Drag: 0
  • Gravity: true
  • Collision detection: Continuous dynamic

Params for the racket:

  • Drag: 0
  • Gravity: false
  • Collision detection: Continuous
  • isKinematic: true

What am i doing wrong? Or maybe Unity does not support ball interaction physics and i need to develop a custome one for that?

1 REPLY 1

janvanhammer
Explorer

Maybe you need to add force when hitting a certain racket movement threshold according to the movement of the racket and speed of the players controller.