Discussions

Ask a Question
Back to All

Touch colliders too big

Using the default Oculus Touch controller models and collider results in each hand object having a Sphere collider with a radius of .15 while I find that a radius of .06 is closer to the models size and even better if it's center is set to -0.015, -0.02, -0.02.

However, I'm having trouble finding the code which attaches these objects and the collider as well as sets these properties. Can you share where I can look in order to edit these values?

Hey, I was having to deal with this problem myself. With multiple interactable objects close to each other, it was hard to have nice precision when the Touch colliders were so big.

I found the radius could be changed in NewtonVR/Oculus/NVROculusInputDevice.cs on line 275. Then to change the center you just add a new line right under that one:

OculusCollider.center = new Vector3(-0.015f, -0.02f, -0.02f);

That should do it. Thanks for finding the best values and posting them here!

Thanks! It works great now!

I added this to account for the different x position required by the RightHand:

float xColliderPos = -0.015f;
if(gameObject.name == "RightHand") {
xColliderPos = 0.015f;
}

OculusCollider.center = new Vector3(xColliderPos, -0.02f, -0.02f);