Search Unity

VR Paddle/ball physics

Discussion in 'Physics' started by Deleted User, Dec 28, 2019.

  1. Deleted User

    Deleted User

    Guest

    Hi all,
    I am trying to make a VR table tennis game, using MRTK (windows immersive relaity headset).
    I have a paddle (prefab) attached to the right controller so it follows the movement of the RC.
    The paddle has a box collider (I have also tried mesh collider) and a kinematic-rigidbody.

    The ball has a non kinematic (+using gravity) rigidbody and a sphere collider.

    I've made a robot which throws balls towards the player. The problem is that when the ball hits the paddle doesn't seem to go back smoothly. The force/direction of the ball doesn't seem to follow the laws of physics. Furthermore, sometimes (when the velocity is high) it passes through the paddle (collision is continuous dynamic for both the ball and the paddle).

    I have searched a lot (unity learn, youtube tutorials etc) and I have tried several combinations of masses, colliders, physics engine changes etc but couldn't find something that works.

    I came to the conclusion that if i code the movement of the paddle (using transfrom.translate or movePosition or sth else) I won't have the above issues. Do you think this could be the solution?If yes, any reccomendations?If not, what would you do?

    Cheers.
     
  2. Deleted User

    Deleted User

    Guest

    Hi!
    How did you go with this? seems damn near impossible to hit an object in unity with VR
     
  3. Deleted User

    Deleted User

    Guest

    Hi. Which headset are you using?