com.unity.uiextensions icon indicating copy to clipboard operation
com.unity.uiextensions copied to clipboard

RFI: Raycast on curvy UI Elements

Open janausis opened this issue 2 years ago • 1 comments

Unity UI Extensions Request for Information

What are you trying to achieve?

I have a VR project in which I would like to be able to point at a curvy Button and select it. The Raycast target of the Button is not curvy, so it does not click the Button correctly. (The Target is in the Wall behind it) I would like to keep using the Raycast of the Controllers, as I use it for all my other UI elements. How can I get it to interact correctly?

What have you already tried

I tried moving the default target area around, but couldn't find a way to make it curve in the same way.

What material have you referenced that didn't answer your question

https://github.com/Unity-UI-Extensions/com.unity.uiextensions/issues/107

I have no idea how to implement this or if it's even going to help me.

janausis avatar Jun 11 '23 11:06 janausis

My simple recommendation would be to put the raycast area for the curvy button in front of the UI and expand its area to ensure it covers the button from a forward-facing angle.

I'll see if I can work up an example for this.

P.S. sorry for the delay in response @janausis, GitHub it seems, refuses to send me notifications for this repo, but I get them for others of mine :S

SimonDarksideJ avatar Jun 16 '23 15:06 SimonDarksideJ