Hi guys i am trying to display buttons on my #d objects position like when i hover on a object it shows the button on its position on screen and when hover is out button should not display but i am not able to achieve it
plz guys help
How can i know the screen position of my object and display a GUI over it ?
and i have to do it from script coz i have to change the button textures and text dynamically
My first thoughts:
- Raycast from the mouse into scene with camera angle.
- OnCollisionStay on the 3D Object
- Show WorldSpace Canvas (parented on the 3D object) when hovering else hide! (GO.setActive(bool))
Maybe this helps. ( But there should be better solutions, this is just a quick one)