Create an interactable World Space Canvas
Hello fellow Developers,
I am currently working on a game that features terminals the player can interact with. I use World Space Canvases to represent the screen of the terminals and I actually don't know how to make those canvases interactable so the player can interact with the GUI elements that are placed on the GUI. There is a cursor on the canvas that the player can move around but it can't interact with any GUI elements (meaning pressing buttons, etc).
I've spent the last couple of days looking this up but I can't get quite my head around this one. As far as I understand is that I need to shot a Raycast from the cursor's position onto the canvas so the GUI element get's hit by that Raycast and the script attached to element is executed (for example a button click). Am I on the right track or did I mix something up? I'd really appreciate if you could help me understand. I'd also appreciate any ressources (YouTube tutorials, other forum posts, etc) that point me to the right direction.
Thank you very much!
Your answer
Follow this Question
Related Questions
World Canvas Raycasting not blocked by other game objects? 2 Answers
Display rigidbody speed to a world space canvas text 2 Answers
Take XYZ of GameObject and convert that to canvas co-ordinates? 0 Answers
How to make Canvas appear after GUI texture? Unity 4.7 1 Answer
Framerate slowly drops when rendering world space canvas with Google VR on Android 0 Answers