I have a button on a canvas. I want a box collider on it so I can use a raycast to select and click the button with the raycast.
However, there is something strange going on with my button and box collider. I can change X and Y size, but the when trying to change Z in the inspector it won’t change. It’s as if the collider is just flat not 3D.
Does anyone know what situations might prevent a box collider’s Z from being resized?
UI elements don’t use colliders to detect clicks. You shouldn’t need to place a collider on it at all.
This is for a VR app using SteamVR. Trying to create a Laser Pointer to point at buttons to select them and click them.
I create a different canvas where the buttons work, if I turn the box collider off on them, I don’t get a valid hit on the button.
I’m still at a loss as to why the other buttons on the other canvas are not working. I had been using VRTK and had those canvas’s and buttons setup to work with VRTK. But I stripped out all VRTK and just going straight to SteamVR… Wondering if something got left behind in the “scene” file that didn’t get cleaned up after removing all VRTK.
BTW, Not to say that VRTK is bad… I really like it, it’s just that I had to remove it due to restrictions at work.