Im a newbie at Unity and recently got the awesome opportunity to play around with the HTC Vive. Im in the process of trying to make a realistic Vive soccer game where the controllers act as the feet (weird i know).
The problem is i cant create realistic collision between the controller and the ball. The Controller has a box collider attached with a rigidbody and a mass of 1. While the soccer ball has a sphere collider, rigidbody and a mass of 0.5. Ive been playing around with the rigidbody values such as mass and drag but to no avail. Im all out of ideas on how to create a realistic interaction between the ball and the kick. Frankily i dont know if im just being stupid at this point, i took a look at the Newton VR scripts (Physics Based Interaction on the Vive) for a possible answer but the physics rely on the ball being attached to the controller not impacting the controller. Please any help, tips or advice will be greatly appreciated. Im really stuck at this point.
It’s hard to say without know Vive myself. But I’m guessing that the controllers are moved using transform.position and transform.rotation instead of using rigidbody.velocity or applying forces.
That makes physics calculations totally unreliable. If you want collisions to be realistic, you should move objects by applying forces (or setting velocity) to their rigid bodies.
@rmassanet So currently the problem is not the two objects interacting and behaving appropriately, it is the collision of the controller interacting with the soccer ball at speed. Currently if i move the controller at speed to collide with the ball, hoping the momentum of the controller (kick) causes the ball to fly in the appropriate direction but instead the ball doesn’t move at the appropriate speed, sort of jitters and gets stuck then starts rolling away slowly.
The collision between the two objects does not happen seamlessly, like a real life kick to a soccer ball should. It seems the collision detection isn’t accurate or fast enough? Any ideas?